I want to capture the access_token returned by this url(below)
But if I HttpResponseredirect, it takes me to a blank page with access_token and expiry secs printed. I want to capture the returned access_token and use it later. Below is my code
def fb_return(request):
code = request.GET.get('code')
fb_id = settings.FB_ID
fb_s = settings.FB_SECRET
url = 'https://graph.facebook.com/oauth/access_token?client_id=%(id)s&redirect_uri=http://127.0.0.1:8000/facebook/return&client_secret=%(secret)s&code=%(code)s'%{'id':fb_id,'secret':fb_s,'code':code}
return HttpResponseRedirect(url)