MCPcopy Create free account
hub / github.com/SimHacker/micropolis / GetFacebookAccessToken

Function GetFacebookAccessToken

turbogears/micropolis/controllers.py:217–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215
216
217def GetFacebookAccessToken():
218 url = tg.url(
219 GraphAPIURL + '/oauth/access_token',
220 client_id=FacebookAppID,
221 client_secret=FacebookAppSecret,
222 grant_type='client_credentials')
223 #print "URL", url
224
225 token = FetchURL(url)
226 #print "TOKEN", token
227 prefix = 'access_token='
228 if token.startswith(prefix):
229 token = token[len(prefix):]
230
231 return token
232
233
234def GetFacebookUser(userID, fields=u'picture,education'):

Callers 2

GetFacebookUserFunction · 0.85
GetFacebookPaymentsFunction · 0.85

Calls 1

FetchURLFunction · 0.85

Tested by

no test coverage detected