FBSDKShareDialog cancels when it should post

后端 未结 4 1853
南笙
南笙 2021-01-01 22:00

I create a FBSDKShareDialog in code

- (void)shareWithFacebookDialog;
{  
  FBSDKShareLinkContent* content = [[FBSDKShareLinkContent alloc] init];
  content.c         


        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-01 22:56

    replace your code with this

    - (void)shareWithFacebookDialog;
    {  
        FBSDKShareLinkContent content = [[FBSDKShareLinkContent alloc]init];
        content.contentURL = [NSURL URLWithString:@"https://www.google.com"];
        content.contentTitle = @"ContentTitle";
        content.contentDescription = @"ContentDescription";
        [FBSDKShareDialog showFromViewController:self
                                     withContent:content
                                        delegate:self];
    }
    

    tell me if it works.

提交回复
热议问题