ios - FB.getLoginStatus returns status unknown -
i using cordova facebook plugin ios .
fb.getloginstatus(function(response) { console.log(json.stringify(response)); }); fb.login( function(response) {});
i getting error {"status":"unknown","authresponse":null}
as stated in facebook document, fb.getloginstatus return 3 possible responses:
- the user logged facebook , has authenticated application (connected)
- the user logged facebook has not authenticated application (not_authorized)
- the user not logged facebook @ time , don’t know if they’ve authenticated application or not (unknown).
fb.getloginstatus(function(response) { if (response.status === 'connected') { // user logged in , has authenticated app // show open graph related features here. such frictionless sharing } else if (response.status === 'not_authorized') { // user logged in facebook, has not authenticated app // show user facebook status } else { // user isn't logged in facebook. // hide facebook status mockups. } });
Comments
Post a Comment