1

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

4

2 回答 2

2

使用以下代码解决问题。

[FBRequestConnection startWithGraphPath:@"feed" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {}];
于 2013-05-01T13:40:55.960 回答
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];

希望它可以帮助你。

于 2013-05-01T12:52:46.453 回答