python - How to get current access_token in graph api? -


i working on graph api in python in appengine , , want access_token to able create new album

  base_url = "https://graph.facebook.com/me/albums"     encoded_album_name= urllib.quote("refacingme.appspot.com")     name="&name="+encoded_album_name     type="&type=post"     access_token="&access_token="+str(fb.uid)         opener = urllib2.build_opener()     opener.addheaders = [('accept-language', 'en-us,en;q=0.8')]     url = "%s%s%s%s" % (base_url,access_token,type,name) 

the best way i've found access token use get_user_from_cookie method of facebook python sdk. there's example usage in comments of file:

https://github.com/facebook/python-sdk/blob/master/src/facebook.py

this requires cookie gets set facebook javascript sdk in browser. may need request permissions (also done through javascript sdk).


Comments

Popular posts from this blog

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

apache - Add omitted ? to URLs -

php - How can I stop spam on my custom forum/blog? -