我复制的代码来自Facebook的开发者网站整合Facebook分享到我的应用程序时,“程序意外@”:复制Facebook的股票代码
NSMutableDictionary<FBGraphObject> *object = [FBGraphObject openGraphObjectForPostWithType:@whatsyourinneragefb:inner_age
title:@Sample Inner Age
image:@https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png
url:@http://samples.ogp.me/578838518886846
description:@];;
[FBRequestConnection startForPostWithGraphPath:@"me/objects/whatsyourinneragefb:inner_age"
graphObject:object
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
// handle the result
}];
然而,“@” @whatsyourinneragefb
之前产生错误"Unexpected @ in program
。此外,像@https://fbstatic-a.akamaihd.net/images/devsite/attachment_blank.png
这样的行拥有@https:白色,其余部分突出显示为绿色,就像它是一条评论,所以即使上述错误消失,我也觉得这样做不起作用。所以:
我该如何解决第一个错误?
和
是代码的功能,或是否需要进行调整的工作?
所有帮助表示赞赏。
您从哪里复制它? – WizKid 2014-10-09 19:47:51
我强烈建议您在提问这样的问题之前,先阅读*至少* Objective-C语言的基础知识。我建议阅读以下内容:http://stackoverflow.com/help/how-to-ask – 2014-10-09 19:50:15
我在Facebook开发人员网站的“我的应用程序”中访问了我的应用程序,然后转到Open Graph,然后单击“获取代码”。 – 2014-10-09 19:50:49