2013-05-01 25 views
1

有谁能让我知道我们应该如何预先填充Facebook上的评论字段从应用程序内。我使用Facebook SDK3.2.I可以设置pictures, captions, name etc.但我找不到message属性it.Can有人让我knoew办呢?谢谢预填充Facebook中的评论字段iOS

回答

2

使用下面的代码来解决问题。

[FBRequestConnection startWithGraphPath:@"feed" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {}]; 
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]; 

希望它可以帮助你。

+0

我们该如何创建Facebook实例?我在最新的Facebook SDK 3.2中找不到Facebook类。 – 2013-05-01 13:33:58