iOS 8.3 and later, Facebook share text not inserted

后端 未结 2 1224
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 17:34

After updating to iOS 8.3 the text is not inserted into the share dialog

i use a standard

UIActivityViewController *vc = [[UIActivityViewController a         


        
2条回答
  •  情书的邮戳
    2020-12-10 17:46

       NSString *strName= @"Mohit Thatai";
       FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
       [login
        logInWithReadPermissions: @[@"public_profile", @"email"]
        handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
           if (error)
           {
              NSLog(@"Process error");
           }
           else if (result.isCancelled)
           {
              NSLog(@"Cancelled");
           }
           else
           {
             FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
              [content setContentTitle:@"GPS Tracker"];
              [content setContentDescription:[NSString stringWithFormat:@"%@ shared an interesting link\n       This might be interesting to you: GPS Tracker for Kids",strName]];
     content.contentURL = [NSURL URLWithString:[NSString stringWithFormat:@"http://gpsphonetrackerkids.com"]];
              [FBSDKShareDialog showFromViewController:self
                                           withContent:content
                                              delegate:nil];
           }
        }];
    

提交回复
热议问题