简体   繁体   English

使用FBMessageDialog iphone sdk打开facebook messanger

[英]open facebook messanger using FBMessageDialog iphone sdk

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];

It always provided me error like as following 它总是为我提供如下错误

-canOpenURL: failed for URL: "fb-messenger-api:/" - error: "(null)" description :: The operation couldn't be completed. -canOpenURL:URL失败:“ fb-messenger-api:/”-错误:“(null)”说明::操作无法完成。 (com.facebook.sdk.share error 202.) (com.facebook.sdk.share错误202。)

From the error, I am guessing it is due to one of the two reasons: 从错误中,我猜这是由于两个原因之一:

  1. the user was not able to get authenticated, make sure you have added the FacebookAppID key in the info.plist file 用户无法通过身份验证,请确保您已在info.plist文件中添加了FacebookAppID密钥
  2. try including keys fbauth and fbauth2 in info.plist under the LSApplicationQueriesSchemes 尝试包括钥匙fbauthfbauth2info.plistLSApplicationQueriesSchemes

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM