我目前正在集成这个 API https://github.com/reallylongaddress...book-Graph-API
集成一切正常,我正在使用“发布”方法将内容发布到人们的墙上,一切正常。原始 API 中的代码也是如此,但下面是我的修改版本...
NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:6];
[variables setObject:strMessageFb forKey:@"message"];
[variables setObject:@"http://fundaciomiro-bcn.org" forKey:@"link"];
[variables setObject:@"Joan Miró" forKey:@"name"];
[variables setObject:@"I am using Joan Miró's iPhone App, The Ladder of Escape, that allows me to take a tour through the artist's Barcelona. Download it now!" forKey:@"description"];
[variables setObject:@"http://nostrostudio.com/clientes/miro/ICONO_512x512.png" forKey:@"picture"];
[variables setObject:@"L'escala de l'evasió" forKey:@"caption"];
FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:@"me/feed" withPostVars:variables];
NSLog(@"postMeFeedButtonPressed: %@", fb_graph_response.htmlResponse);
但我的问题是,
它在模拟器上完美运行。但是当我尝试在真实设备上运行时,我可以运行这个脚本两次。第三次崩溃了。我觉得它与字典有关。
有什么帮助吗?
[此外,此 Post 方法不适用于 IOS 5.0 模拟器。当我尝试发布某些内容时,应用程序会崩溃,但内容已成功发布在 Facebook 上。]