简体   繁体   中英

Facebook mobile Safari not working

I have implemented Facebook Connect SSO to my website at http://pocketly.com/login and it seems to work across all Desktop browsers. But for some reason it does not work on my iPhone, I have tried with both Mobile Safari and Mobile Chrome and all it does is open up the Facebook auth page and then dies. The first time i log in on the browser it authenticates correctly then closes the window which in turn goes back to my website, but it doesn't seem like the callback is being called. Every other time i try to call it it just dies on Facebook website with a white screen. I am using the Javascript SDK with the FB.login function. I don't know what else to do or how to debug it, i have even tried the web inspector on the new ios6 mobile safari. If any one has any suggestions please let me know, if you would like to see some code examples or know more information i would be happy to share. Also i did some research and here are some similar questions with no answers:

Facebook JS SDK Not Working On Safari
Facebook JS SDK not loading on Safari Mobile (using iPad)
Facebook FB.login works in Safari, but not mobile Safari

It turns out that the JS SDK seems to have a problem on mobile safari, i ran across this problem on other sites as well. What i ended up doing was using the PHP SDK which involves a redirect instead of the windows trying to communicate. It turns out this approach is way easier. Anyone else with issues with the JS SDK should try the PHP one first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM