Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
缩略图图像不显示在IOS中的FBDialog共享中_Ios_Objective C_Facebook_Facebook Graph Api - Fatal编程技术网

缩略图图像不显示在IOS中的FBDialog共享中

缩略图图像不显示在IOS中的FBDialog共享中,ios,objective-c,facebook,facebook-graph-api,Ios,Objective C,Facebook,Facebook Graph Api,我试图通过对话框在FB上发帖 但我的图片不会在对话框中显示为缩略图。 当我发布时,图像会显示在Web上,但不会显示在对话框中 我的代码如下: FBShareDialogParams *params = [[FBShareDialogParams alloc] init]; params.link = [NSURL URLWithString:[Dict objectForKey:@"url"]]; params.name = [Dict objectFor

我试图通过对话框在FB上发帖

但我的图片不会在对话框中显示为缩略图。 当我发布时,图像会显示在Web上,但不会显示在对话框中

我的代码如下:

    FBShareDialogParams *params = [[FBShareDialogParams alloc] init];
        params.link = [NSURL URLWithString:[Dict objectForKey:@"url"]];
        params.name = [Dict objectForKey:@"name"];
        params.caption = [Dict objectForKey:@"dicription"];
        params.picture=[NSURL URLWithString:@"https://s3-us-west-2.amazonaws.com/appicon/facebook-share-logo.png"];
        params.description = [Dict objectForKey:@"dicription"];

if ([FBDialogs canPresentShareDialogWithParams:params])
        {
            /*
            [FBDialogs presentShareDialogWithLink:params.link
                                             name:params.name
                                          caption:params.caption
                                      description:params.description
                                          picture:params.picture
                                      clientState:nil
                                          handler:^(FBAppCall *call, NSDictionary *results, NSError *error)
             {
                 if(error)
                 {
                     // An error occurred, we need to handle the error
                     // See: https://developers.facebook.com/docs/ios/errors
                     //NSLog(@"%@",[NSString stringWithFormat:@"Error publishing story: %@", error.description]);
                 }
                 else
                 {
                     // Success
                     //NSLog(@"result %@", results);
                 }
             }];
}
我也提到这个链接:

但仍然无法解决

请帮我解决这个问题。

请试试这个:

SLComposeViewController *Facebooksheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
[Facebooksheet addImage:[UIImage imageNamed:@"image.png"]];
[self presentViewController:Facebooksheet animated:YES completion:nil];

请添加Social.Framework。

谢谢您的回复!但我正在使用本机应用程序的对话框。