2

My question is the next. I am allowing to the user to post a link from an iOS native app. Using the old dialog system was possbile to display a thumbnail/preview of the link in the dialog pop up. That was very informative to the user. In the new native dialog system is not appearing the content is gonna be shared, instead appears a placeholder with a cute compass fixed with a paperclip. Is it possible to display the contents are gonna be shared instead of the compass thumbnail? (I know with photos is working but don't know how to make it work with links) Here is the code I am using:

[FBNativeDialogs presentShareDialogModallyFrom:self
 initialText: nil
 image: nil
 url: [NSURL URLWithString:href]
 handler:^(FBNativeDialogResult result, NSError *error) {

     if (error) {

     }
     else
     {

         switch (result) {
             case FBNativeDialogResultSucceeded:
             {

             }
                 break;
             case FBNativeDialogResultCancelled:

                 break;
             case FBNativeDialogResultError:

                 break;
        }

     }

 }];
gabrielpalomino
  • 331
  • 3
  • 8

1 Answers1

0

When you use the iOS native dialogs, with the Facebook SDK or via SLComposeViewController directly, you need to have the image itself ahead of time. It doesn't work like the web dialogs in which you can set a URL.

This is something I had to deal with recently, and with iOS 7, if you don't have the image, the compass icon will show, and then the framework will go out and grab a thumbnail-size preview of the web page represented by the URL that you set.

This new behavior is either awesome or awful depending on your UX needs. For us, it was awful, and therefore was even more critical to download the image ahead of time, and make sure you have the image bits in hand when you call the Facebook native dialog -- either via the way you show above (the old, deprecated way) or by using:

[FBDialogs presentOSIntegratedShareDialogModallyFrom:initialText:image:url:handler:]

Hope this helps!

Evan K. Stone
  • 1,169
  • 11
  • 15