FBSharebutton始终在webview中打开sharedialog

时间:2015-10-05 09:14:29

标签: ios xcode7 facebook-sdk-4.0 fbsdk

我正在我的项目中实现FBShareButton,但共享对话框总是打开WebView / Safari View而不是facebook native app。我正在使用facebook SDK 4.6& xcode 7 ..当我单独使用共享对话框时,它会在应用程序中打开,但是当我使用FBShareButton打开共享对话框时,它总是在Web视图中打开...我的代码是

-(void)openFacebookDialog
{
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
  content.contentURL = [NSURL
    URLWithString:@"https://www.facebook.com/FacebookDevelopers"];
  FBSDKShareButton *shareButton = [[FBSDKShareButton alloc] init];
  shareButton.shareContent = content;  
  shareButton.center = self.view.center;
  [self.view addSubview:shareButton];
}

0 个答案:

没有答案
相关问题