()
| 215 | |
| 216 | |
| 217 | def 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 | |
| 234 | def GetFacebookUser(userID, fields=u'picture,education'): |
no test coverage detected