Facebook Connect iPhone自定义发布流

我刚刚下载了适用于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];` 

这段代码应该填充自定义流吗? 如果是这样,为什么演示项目不适合我呢? 如果没有,为了使用自定义数据填充流,我需要采取哪些步骤?

谢谢你的帮助,

示例应用程序有点过时了。 阅读Facebook的Feed对话文档 ,查看您可以设置的属性,然后,就这样做:

 NSDictionary* params = [NSDictionary dictionaryWithObjectsAndKeys: @"Share on Facebook", @"user_message_prompt", @"http://www.yoursitehere.com/", @"link", @"http://sofzh.miximages.com/iphone/thumbnail.jpg", @"picture", nil]; [self.facebook dialog:@"feed" andParams:params andDelegate:self]; 

@Mahmud:Facebook会自动生成你朋友的信息,以显示你的家庭饲料部分; 一旦你贴在你的墙上,你朋友的主屏幕将根据facebook用于填充家庭饲料的算法得到你的post; 可能你的饲料没有得到家庭饲料项目的顶部位置,但它肯定会有…在4 5个post之后;