javascript - facebook manual login and share and get surrent user details -


i'm creating firefoxos application using jquery mobile , cordova.there no api in cordova integrating facebook , firefox applications.

  1. i have created app in facebook , since there no platform firefoxos,i have selected "website" platform.the problem there no url firefoxos application(only index.html),that can give redirect url in app settings page of developer.facebook .and have followed steps url (//developers.facebook.com/docs/facebook-login/login-flow-for-web/v2.3) , working fine in browser i'm able login , share , user details. when copy/paste code in firefox project's index.html,the sdk does'nt seem loading none of functionality working.

  2. apart above trial,i have done "login" flow manually using url window.open("//www.facebook.com/dialog/oauth?client_id=app_id&response_type=token&redirect_uri=//my_localhost/name/success.html").i'm able access current user's access_token success.html in server,but unable access in index.html(as not hosted anywhere).i have tried use localstorage,sessionstorage,cookies in success.html . wondering if there way of getting current user's access_token after have logged in. have used url https://graph.facebook.com/oauth/access_token?client_id=&redirect_uri=&client_secret=&code= (from //developers.facebook.com/docs/facebook-login/access-tokens) didnt getting access token redirected success.html page in server.i need access_token pass parameter url https://graph.facebook.com/me?fields=id,name,email,picture&access_token=access_token in order details of user logged in .

but i'm able share using url window.open("//www.facebook.com/dialog/feed?app_id=app_id&link="+encodeuricomponent(urlpost)+"&caption=&description="+encodeuricomponent(message)+"&redirect_uri=my_localhost/name/success.html")with respect user logged without access_token (i dont know how posting wall of current user)

is there solution above problem? thank you!!


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -