Skip to content

Instantly share code, notes, and snippets.

@kristi
Created September 1, 2011 16:00
Show Gist options
  • Save kristi/1186501 to your computer and use it in GitHub Desktop.
Save kristi/1186501 to your computer and use it in GitHub Desktop.
get facebook app access token
#!/usr/bin/env python
import urllib2
app_id='123abc'
app_secret='987fed'
def get_app_access_token(app_id, app_secret):
app_login_url = 'https://graph.facebook.com/oauth/access_token?client_id={app_id}&client_secret={app_secret}&grant_type=client_credentials'.format(app_id=app_id, app_secret=app_secret)
access_token = urllib2.urlopen(app_login_url).read()
return access_token
access_token = get_app_access_token(app_id, app_secret)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment