Search code examples
iphonefacebookfbjsfb.uifacebook-javascript-sdk

Opening mobile web application from shared link from Facebook iOS application


I have a mobile web application that uses the Javascript SDK to connect to facebook and use the Graph API to retrieve user information. When testing on an iPhone, the site works fine from Safari, but if a user adds a link to the website in a status post and the site is opened within the Facebook iPhone application, the login javascript is not being called.

I'm currently using FB.UI method:'permissions.request' but I have tried calling other fb.ui dialogs etc and nothing is loaded either.

Is there a way to get these to work from within the Facebook iPhone app? Is there a way to force the links to open in Safari instead of the Facebook application?


Solution

  • I got around this issue by using a redirect URL for authentication on the button rather than trying to call the JS method to open a dialog. It required a little extra coding to handle the return but ultimately got around the issue.