使用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 …