在我的iPhone集成Facebook应用程序,但是当我张贴在我的墙上我的朋友无法分享我该怎么办?

我使用Facebook集成我的iOS应用程序之一,它共享报价。 但问题是,当我的时间线上的post引用我的朋友不能分享只是“喜欢”和“评论”。 我想共享,请参阅附加屏幕截图,那么最好的解决scheme是什么在我的FB应用程序中有问题,或者我必须在iOS中做代码。

FB的屏幕截图

提前致谢

我检查了你的截图。 这基本上就像fb“喜欢邮政”。 由于没有人不能分享这个职位。 我build议你使用最新的ios fb sdk 3.1.1,然后将你的fs sdk与你的ios应用程序整合在一起。 然后使用下面的代码

对于iOS 6和更高版本使用ios 6原生fb post方法:

if(NSClassFromString(@"SLComposeViewController") != nil) { UIApplication* app = [UIApplication sharedApplication]; app.networkActivityIndicatorVisible = NO; SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result){ if (result == SLComposeViewControllerResultCancelled) { NSLog(@"\nCancelled"); } else { NSLog(@"\nDone"); } [controller dismissViewControllerAnimated:YES completion:Nil]; }; controller.completionHandler =myBlock; [controller setInitialText:FB_POST_FEED_INITIAL_TEXT_MSG]; [controller addURL:[NSURL URLWithString:BITLY_VIEW_LINK]]; // youtube video link [self presentViewController:controller animated:YES completion:Nil]; } 

否则使用这个FB sdk方法:

  [FBSession openActiveSessionWithReadPermissions:nil allowLoginUI:YES completionHandler: ^(FBSession *session, FBSessionState state, NSError *error) { switch (state) { case FBSessionStateOpen: //first shows the hud view then initiating the post message feed process [self postFBMessageOnUserWall]; break; case FBSessionStateClosed: //need to handle break; case FBSessionStateClosedLoginFailed: //need to handle break; default: break; } }]; -(void)postFBMessageOnUserWall { NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: FB_POST_FEED_INITIAL_TEXT_MSG, @"name", BITLY_VIEW_LINK, @"link", nil]; [FBRequestConnection startWithGraphPath:@"me/feed" parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { //show the alert says that message successfully posted in your wall [self performSelectorOnMainThread:@selector(showAlertFromMainThread:) withObject:error waitUntilDone:NO]; NSLog(@"\n\nfb post feed error status = %@", error); }]; }