Can i share deep links with iPhone Simulator?

Deep links

iOS allows apps to open other apps using custom schema URLs. Integration with Facebook allows users to navigate directly to your application from the Facebook application through these URLs, which we will call β€œdeep linking”. For example, when your posts are on Facebook applications on behalf of your users, it may include one of these URLs or deep links in the post. Then, when friend users interact with and they are directed to your application, you will receive this link and you can process it to decide what kind of land them to land.

I can share the β€œnormal” links from my test application with iPhone Simulator. Now I want to share deep links with iPhone Simulator. But as soon as I change the code to use a deep link, the sharing process does not work.

Sharing works with this set of parameters (Note: the link is a regular URL):

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"Sharing Tutorial", @"name",
                               @"Build great social apps and get more installs.", @"caption",
                               @"Allow your users to share stories on Facebook from your app using the iOS SDK.", @"description",
                               @"https://developers.facebook.com/docs/ios/share/", @"link",
                               @"http://i.imgur.com/g3Qc1HN.png", @"picture",
                               nil];

Sharing does not work with this set of parameters (now the link is a deep link):

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"Sharing Tutorial", @"name",
                               @"Build great social apps and get more installs.", @"caption",
                               @"Allow your users to share stories on Facebook from your app using the iOS SDK.", @"description",
                               @"fbAPPID://authorize#target_url=[MYURL]", @"link",
                               @"http://i.imgur.com/g3Qc1HN.png", @"picture",
                               nil];

This is the code I use to exchange the link:

[FBWebDialogs presentFeedDialogModallyWithSession:nil
                                       parameters:params
                                          handler:^(FBWebDialogResult result, NSURL *resultURL, 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 publishing story: %@", error.description]);
                                              } else {
                                                  if (result == FBWebDialogResultDialogNotCompleted) {
                                                      // User cancelled.
                                                      NSLog(@"User cancelled.");
                                                  } else {
                                                      // Handle the publish feed callback
                                                      NSDictionary *urlParams = [self parseURLParams:[resultURL query]];

                                                      if (![urlParams valueForKey:@"post_id"]) {
                                                          // User cancelled.
                                                          NSLog(@"User cancelled.");

                                                      } else {
                                                          // User clicked the Share button
                                                          NSString *result = [NSString stringWithFormat: @"Posted story, id: %@", [urlParams valueForKey:@"post_id"]];
                                                          NSLog(@"result %@", result);
                                                      }
                                                  }
                                              }
                                          }];

This is the error that I see when I try to share with the second set of parameters:

Error display

I receive it immediately after providing my credentials. This is not very informative. I do not know where to look. Is it even possible to exchange deep links with iPhone Simulator?

: Deep Links Custom Schemes Facebook App. URL Scheme Suffix Facebook .

+4

All Articles