使用iOS Facebook SDK发布到朋友的墙上

时间:2012-02-03 14:06:36

标签: objective-c ios facebook

是否可以使用iOS Facebook SDK的dialog方法发布到活跃用户的朋友的墙上?也就是说,假设已经授予了正确的权限?

使用对话框方法,"feed"作为操作,似乎只允许我发布到用户的流,而不是任何人。我错过了什么?

[facebook dialog:"feed" andParams:... andDelegate:self]

params仅指定帖子的内容;似乎没有任何方法可以指定我要发布的配置文件。

2 个答案:

答案 0 :(得分:1)

只需使用以下代码:

[facebook requestWithGraphPath:@"[IdOfFriend]/feed" andParams:... andHttpMethod:@"POST" andDelegate:self];

答案 1 :(得分:1)

通过图形路径在朋友墙上发布不再有效 你的饲料行动有效..有像

这样的参数
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                   @"Checkout my APP_NAME", @"name",
                                   @"Come visit my APP_NAME", @"caption",
                                   [NSString stringWithFormat:@"I just joined APP_NAME Can you?"], @"description",
                                   @"http://www.friendsmash.com/images/logo_large.jpg", @"picture",
                                   @"FRIEND'S_FB_USER_ID", @"to",

                                   // Add the link param for Deep Linking
                                   [NSString stringWithFormat:@"https://YOUR_WEB_LINK.com/"], @"link",
                                   nil];

...干杯!