【发布时间】:2011-02-26 00:30:41
【问题描述】:
我刚刚下载了 iOS 版 Facebook SDK,因为我需要能够将自定义流发布到用户的 Facebook 订阅源。示例应用程序有一个名为 publishStream:(id)sender 的方法,它似乎为“发布流”对话框设置了自定义描述,但是当我的对话框出现时,我看到的只是一个开始输入的空对话框。示例中的代码应用是这样的:
`SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"Always Running",@"text",@"http://itsti.me/",@"href", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"a long run", @"name",
@"The Facebook Running app", @"caption",
@"it is fun", @"description",
@"http://itsti.me/", @"href", nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[_app.facebook dialog:@"feed"
andParams:params
andDelegate:self];`
此代码是否应填充自定义流?如果是这样,为什么演示项目不为我做呢?如果没有,我需要采取哪些步骤才能使用自定义数据填充流?
感谢您的帮助,
【问题讨论】:
标签: iphone facebook ios publish connect