Facebook OAuth “Unsupported” in Chrome on iOS

后端 未结 7 1592
我寻月下人不归
我寻月下人不归 2020-12-01 04:38

The Facebook OAuth popup is throwing an error in Chrome on iOS only. Both developers.facebook.com and google have turned up nothing about this. Ideas?

相关标签:
7条回答
  • 2020-12-01 05:18

    This is how I did it (fixing iOS chrome specifically)

    // fix iOS Chrome
    if( navigator.userAgent.match('CriOS') )
        window.open('https://www.facebook.com/dialog/oauth?client_id='+appID+'&redirect_uri='+ document.location.href +'&scope=email,public_profile', '', null);
    else
        FB.login(null, {scope: 'email,public_profile'});
    
    0 讨论(0)
提交回复
热议问题