开发者

Opening mobile web application from shared link from Facebook iOS application

开发者 https://www.devze.com 2023-04-13 02:43 出处:网络
I hav开发者_如何学运维e 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

I hav开发者_如何学运维e 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?


You should make sure to set up for authenticated referrals so that if the user clicks on a link to you mobile web app from the Facebook iPhone app, that they will be authenticated before landing on your page. For instructions on how to do this check out https://developers.facebook.com/docs/guides/mobile/web/#login

To answer your last question you cannot make the links open up in Safari from inside the Facebook app.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消