Send a link using the Facebook message dialog that ignores all options

I am trying to send / send a link to friends through the new Facebook message dialog, which was implemented in version 2.0.

I follow the direction from the docs: https://developers.facebook.com/docs/ios/share#message-dialog-getting-started and this is what I tried:

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

and this: (must be the same thing)

 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, 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.description]); } else { // Success NSLog(@"result %@", results); } }]; 

Both of these methods call my Facebook messenger application with a dialog pre-populated with my parameters. BUT, when I sent the message, everything but the link was GONE at the end of the receiver.

From what I understand, the user does not need to register through the application to send messages from the Facebook dialog box.

Does anyone know what is going on here? Is this a bug on Facebook?

EDIT: This is confirmed as a facebook error: https://developers.facebook.com/bugs/1547232035503916

+8
ios facebook-graph-api facebook-messages
source share
2 answers

Although this bug was fixed in June 2014, similar problems with the latest Facebook example code are still possible. The last example, “FBShareSample,” and the Facebook sharing documentation for iOS, use the method

 [FBDialogs presentShareDialogWithLink:....] 

which uses only the link from the parameters, and none of the other parameters (although in the last example Feed Dialog really uses all the parameters). To use all options in the Sharing dialog, you need to use

 [FBDialogs presentShareDialogWithParams:...] 
+3
source share

I noticed that this depends on the url you submit. If the URL contains the Facebook Open Graph, the parameters from the Open URL graph are displayed, and these parameters overwrite the ones you posted.

eg. I am trying to use the url in my App Store. Each link in the App Store contains Facebook Open Graph, so it doesn’t work.

I think Facebook recommends using public graphs Open Graph in this case.

0
source share

All Articles