预先填充facebook iOS中的评论字段

时间:2013-05-01 12:48:11

标签: ios xcode facebook facebook-graph-api comments

任何人都可以让我知道我们如何在应用程序内预先填充Facebook上的评论字段。我正在使用Facebook SDK3.2。我可以设置pictures, captions, name等。但我找不到{{1它的属性。任何人都可以让我知道吗?谢谢

2 个答案:

答案 0 :(得分:2)

使用以下代码解决此问题。

[FBRequestConnection startWithGraphPath:@"feed" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {}];

答案 1 :(得分:1)

NSString *message = @"It is an iOS App";
NSString *urlIs = YOUR_URL;
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               kFBAppId, @"api_key",
                               message,@"message",
                               urlIs, @"link",
                               @"YOUR_IMAGE_URL", @"picture",
                               @"Name OF App", @"name",
                               @"PASS your comment here", @"description",
                               nil];

//send message to all FB IDs
NSString *path=[[NSString alloc]initWithFormat:@"%@/feed",@"f_userId"];
NSLog(@"fb path : %@",path);
[self.facebook requestWithGraphPath:path andParams:params andHttpMethod:@"POST" andDelegate:self];

希望它对你有所帮助。