Facebook IOS SDK不与朋友分享新闻Feed

时间:2014-02-02 03:22:05

标签: ios iphone facebook-graph-api ios7

我正在开发的应用程序上安装了Facebook sdk,但是当我发布帖子时,它只出现在我的特定墙上或新闻源上,我的朋友看不到帖子。我需要做些什么才能让我的应用程序发布的帖子也可以显示给我的朋友,而不仅仅是我的墙。

 // NOTE: pre-filling fields associated with Facebook posts,
// unless the user manually generated the content earlier in the workflow of your app,
// can be against the Platform policies: https://developers.facebook.com/policy

NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
[params setObject:headline.text forKey:@"message"];
[params setObject:UIImagePNGRepresentation(image) forKey:@"picture"];




[FBRequestConnection startWithGraphPath:@"me/photos"
                             parameters:params
                             HTTPMethod:@"POST"
                      completionHandler:^(FBRequestConnection *connection,
                                          id result,
                                          NSError *FBerror)
 {
     if (FBerror)
     {
         //showing an alert for failure
         NSLog(@"failed to post to facebook");

     }
     else
     {
         //showing an alert for success
         NSLog(@"facebook upload successful");

         profileViewController *profile = [[profileViewController alloc]init];
         profile.author_name = username;
         profile.previous = @"sidemenu";
         [self.navigationController pushViewController:profile animated:YES];
     }
 }];

}

0 个答案:

没有答案
相关问题