使用FBMessageDialog iphone sdk打开facebook messanger

时间:2016-06-14 11:12:35

标签: ios objective-c iphone facebook

FBSDKMessageDialog * shareDialog = [[FBSDKMessageDialog alloc] init];

FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];

content.contentDescription =@"HELLO";

content.contentURL = [NSURL URLWithString:@"http://202.258.69.3"];

shareDialog.shareContent = content;
shareDialog.delegate = self;

[FBSDKMessageDialog showWithContent:content delegate:self];

它总是给我提供如下错误

  

-canOpenURL:URL失败:“fb-messenger-api:/” - 错误:“(null)”description ::操作无法完成。   (com.facebook.sdk.share错误202。)

1 个答案:

答案 0 :(得分:0)

从错误中,我猜这是由于以下两个原因之一:

  1. 用户无法通过身份验证,请确保在FacebookAppID文件中添加了info.plist密钥
  2. 尝试在fbauth
  3. 下的fbauth2中添加密钥info.plistLSApplicationQueriesSchemes