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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -