Well, if the response type is json, and it comes in type str.
If you use 2.4 from Python, use simplejson, if 2.6 use json:
import json
retdict = json.loads(content)
Then treat it like a dictionary.
accesstoken = retdict['access_token']
Iains source
share