【发布时间】:2011-08-29 13:27:22
【问题描述】:
在上面搜索了 2 天后,我终于发布了我的代码。
应用说明:我正在通过 imagePicker 选择图像,编辑后我想在 Facebook 上分享。
问题:我可以在墙上发布文字但不能在墙上发布图片,因为我没有任何 URL,我无法找到另一种在墙上发布图片的方式。
这是我的 PostToWall 的代码(我从另一个应用程序中窃取的)
FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.userMessagePrompt = @"Enter your message:";
dialog.actionLinks = @"[{\"Get DowntownLA!\",\"href\":\"http://www.facebook.com/DowntownLA.com/\"}]";
dialog.attachment = [NSString stringWithFormat:
@"{ \"name\":\"%@\","
"\"href\":\"%@\","
"\"caption\":\"%@\",\"description\":\"%@\","
"\"media\":[{\"type\":\"image\","
"\"src\":\"%@\","
"\"href\":\"%@\"}],"
"\"properties\":{\"%@\":{\"text\":\"%@\",\"href\":\"%@\"}}}", @"name: priya",@"href nothing",@"cation nothing",@"description nothin", @"imageSource nothing ", @"imageHref nothing", @"linkTitle nothing", @"linkText nothing", @"linkHref nothing"];
[dialog show];
请告诉我哪里出错了!!!!!!
在模拟器上出现的错误是:应用程序响应错误 - 后操作链接必须是有效的 URls。您可以看到这一点,因为您是该应用的开发者之一。
【问题讨论】:
标签: iphone objective-c cocoa-touch facebook fbconnect