iphone facebook发布流问题
我正在使用iOS facebook DemoApp示例发布到我的个人资料中。它很好用。我的问题是如何在这篇文章中添加图片链接?我使用的代码是:iphone facebook发布流问题,iphone,facebook,ios,sdk,fbconnect,Iphone,Facebook,Ios,Sdk,Fbconnect,我正在使用iOS facebook DemoApp示例发布到我的个人资料中。它很好用。我的问题是如何在这篇文章中添加图片链接?我使用的代码是: - (IBAction)publishStream:(id)sender { SBJSON *jsonWriter = [[SBJSON new] autorelease]; NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionar
- (IBAction)publishStream:(id)sender
{
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"title",@"text",
@"http://www.link.com/",@"href",
nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"This is a name!", @"name",
@"This is a caption!", @"caption",
@"http://www.link.com/images/log1.png", @"picture",
@"This is a long description that goes on an on.", @"description",
@"http://www.link.com", @"href",
nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
kAppId, @"api_key",
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[facebook dialog:@"stream.publish"
andParams:params
andDelegate:self];
}
这幅画不会出现。我使用的链接是正确的。该职位获得了成功。我怎样才能让图片链接显示出来
感谢您的帮助。Facebook iOS SDK中的示例应用程序有点过时。在回答这个问题时,我详细介绍了发布到用户流的正确方法和相关文档页面