问题
This is not native solution, just responsive web site.. The problem is, that FB.login simply doesn't do anything. The same goes for FB.ui methods..
i call fb init in head (but also tried in body with same results..) like this:
<script type="text/javascript">
FB.init({
appId: '{$app_id}',
status: true,
cookie: true,
xfbml: true,
channelUrl: 'https://www.nottyfly.com/channel.php',
oauth: true
});
When user clicks fb login button, the code is like this:
function fbLogin(){
FB.login(function(response) {
if (response.authResponse) {
FB.api('/me/permissions', function (response) {
var perms = response.data[0];
document.getElementById("accesstoken").value=FB.getAuthResponse()['accessToken'];
document.getElementById("korak1").submit();
} );
} else {
alert('{$alert_confirm_app}');
}
}, {scope:'email'});
}
This all work great at web pages, but on mobile browsers produces nothing?
ps. Here is demo web page
回答1:
This is common issue among mobile browsers and you will find that it would also be in some android devices.
For precaution it is under best practice to build flow of login manually. Go here https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
So yes, you will need to go with manual integration. But, it will be full-proof integration without doubts.
来源:https://stackoverflow.com/questions/31248610/fb-login-not-working-in-mobile-browsers