Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/8.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
facebook与webdialog共享fb事件(在iOS上)_Ios_Facebook_Share - Fatal编程技术网

facebook与webdialog共享fb事件(在iOS上)

facebook与webdialog共享fb事件(在iOS上),ios,facebook,share,Ios,Facebook,Share,嗨,我有以下问题。 如果我从iOS应用程序共享facebook事件url(如),我有两种可能性: (1) 已安装iOS facebook应用程序 (2) 未安装iOS facebook应用程序 我认为情况1一切都很好。facebook应用程序获取活动信息,显示正确的预览,facebook墙上的帖子也是正确的。 在案例2中,我使用了FBWebDialods类,它显示了一个没有图片的预览,而且facebook墙上的帖子只是文本。没有图像和出席按钮 有人知道在这两种情况下,我如何在facebook墙上

嗨,我有以下问题。 如果我从iOS应用程序共享facebook事件url(如),我有两种可能性: (1) 已安装iOS facebook应用程序 (2) 未安装iOS facebook应用程序

我认为情况1一切都很好。facebook应用程序获取活动信息,显示正确的预览,facebook墙上的帖子也是正确的。 在案例2中,我使用了FBWebDialods类,它显示了一个没有图片的预览,而且facebook墙上的帖子只是文本。没有图像和出席按钮

有人知道在这两种情况下,我如何在facebook墙上获得相同的结果帖子吗?

我得到以下回复:

并在当前共享对话框中添加:

[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);
                                }
                              }];

我希望这能帮助你

就像我在问题中写的那样,我已经使用了共享和提要对话框之间的切换。如果安装了facebook应用程序,共享对话框的一切都会正常工作。我的问题是如何在共享facebook事件时使用具有相同结果(图片、共享按钮)的提要对话框。
[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);
                                }
                              }];