小编Đại*_*ơng的帖子

使用Facebook SDK 4.15.1在iOS 10上使用Facebook SDK登录,分享和喜欢时获取空白页面

使用FBSDKLoginKit,FBSDKShareKit登录,共享链接和我的应用程序中的链接时,我收到此错误.我使用FBSDKLoginButton登录

 @property (nonatomic, strong) IBOutlet FBSDKLoginButton *loginButton;

- (void)viewDidLoad {
    [super viewDidLoad];

    self.loginButton.publishPermissions = @[@"publish_actions"];
}
Run Code Online (Sandbox Code Playgroud)

使用FBSDKShareKit分享:

- (FBSDKShareDialog *)getShareDialogWithContentURL:(FBSDKShareLinkContent *)content
{
    FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc] init];
    shareDialog.shareContent = content;
    return shareDialog;
}

- (IBAction)ShareAppOnFB:(UIButton *)sender {

        FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
        FBSDKShareDialog *facebookShareDialog = [self getShareDialogWithContentURL:content];

        if ([facebookShareDialog canShow]) {
            [FBSDKShareDialog showFromViewController:self.parentViewController
                                         withContent:content
                                            delegate:self];
        }

}
Run Code Online (Sandbox Code Playgroud)

使用FBSDKShareKit喜欢:

FBSDKLikeButton *like = [[FBSDKLikeButton alloc] init];
like.objectID = @"";
like.frame = CGRectOffset(like.frame, 50, 100);
[self.view addSubview:like];
Run Code Online (Sandbox Code Playgroud)

在iOS 9和iOS 8上一切正常,但是当我升级到Xcode 8并在iOS …

facebook objective-c facebook-login facebook-ios-sdk ios10

3
推荐指数
1
解决办法
1191
查看次数