Run a method when the on success with facebook login -
i using following code people log in facebook on website.
function logintofb (){ if( navigator.useragent.match('crios') ) window.open('https://www.facebook.com/dialog/oauth? client_id='+1691221377775124+'&redirect_uri='+ document.location.href +'&scope=publish_actions', '', null); else fb.login(function(response) { // handle response }, {scope: 'publish_actions'}); }
now when have token want run method, how know once token received? thanks
this read might useful you: https://stackoverflow.com/a/4760745/5392479
alternatively, can use fb.api() , make graph api call facebook access token. graph api path available in developers.facebook.com documentation.
Comments
Post a Comment