0

FBDialogs presentations can have a link as NSURL and picture as NSURL as parameters. But how to make clicking the post on the mobile to link back to iOS App if installed (to AppStore if not) and to some web page when accessed from the browser?

I've got the URL scheme of fb[app_id] set. What to do next? How to use it to launch my app when clicking the post?

Thanks!

vzm
  • 2,440
  • 6
  • 28
  • 47
user-123
  • 874
  • 1
  • 13
  • 34
  • 1
    Did you turn on deep linking in your app settings on facebook? – Ming Li Nov 11 '13 at 19:06
  • Yes. But what should I pass to FBDialogs presentShareDialogWithLink: name: caption: picture: in the link parameter? How clicking the post that shares some link will open my iOS app? – user-123 Nov 11 '13 at 20:31
  • 1
    You can pass any link, but it should be a link that you want to distribute. As an example, if you are the New York Times app, you'd probably want to put in a nytimes.com url. – Ming Li Nov 12 '13 at 17:52

2 Answers2

1

add this method in appdelegare class

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    return YES;
}
kirti Chavda
  • 3,029
  • 2
  • 17
  • 29
0

Will answer myself the question. What was missing in my understanding, is that clicking the post from a web will open the link that I share with - FBDialogs presentShareDialogWithLink: name: caption: picture:, whereas clicking it on iPhone will open my app and not that link, if deep linking is turned on in FB's app settings.

user-123
  • 874
  • 1
  • 13
  • 34