我试图通过在v2.0中实现的新Facebook消息对话框分享/发送给朋友的链接.
我一直在遵循文档的指示:https://developers.facebook.com/docs/ios/share#message-dialog-getting-started
这就是我尝试过的:
[FBDialogs presentMessageDialogWithLink:[NSURL URLWithString:@"http://XXX.net/"] name:@"NAME" caption:@"CAPTION" description:@"DESCRIPTION" picture:nil 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 messaging link: %@",error.des cription]); } else { // Success NSLog(@"result %@",results); } }];
而这:(应该是同一件事)
FBLinkShareParams *params = [[FBLinkShareParams alloc] init]; params.link = [NSURL URLWithString:@"http://xxx.net/"]; params.name = @"NAME"; params.caption = @"CAPTION"; //params.picture = [NSURL URLWithString:@"http://upload.wikimedia.org/wikipedia/en/c/cd/Aller_Media_logo.png"]; params.linkDescription = @"DESCRIPTION"; [FBDialogs presentMessageDialogWithParams:params clientState:nil handler:^(FBAppCall *call,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 messaging link: %@",error.description]); } else { // Success NSLog(@"result %@",results); } }];
这两种方法都会在我的Facebook Messenger应用程序中显示预先填充了我的参数的对话框.但是当我发送消息时,除了链接之外的所有内容都是GONE在接收方端.
根据我的理解,用户不必通过应用程序登录,以便能够从Facebook消息对话框发送消息.
有没有人知道这里发生了什么?这是一个Facebook Bug吗?
编辑:这已被确认为facebook-bug:https://developers.facebook.com/bugs/1547232035503916