From f991802d9e7b57a321c22373fd83e3f30eb9f8d0 Mon Sep 17 00:00:00 2001 From: pictuga Date: Mon, 16 Jun 2014 13:57:53 +0200 Subject: [PATCH] Try to use less server-specific code for FB tokens --- morss/morss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index fe5b25c..4da85ea 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -792,7 +792,7 @@ def doFacebook(url, environ, headers, options, cache): if 'code' in query: # get real token from code code = urlparse.parse_qs(query)['code'][0] - eurl = "https://graph.facebook.com/oauth/access_token?client_id={app_id}&redirect_uri={redirect_uri}&client_secret={app_secret}&code={code_parameter}".format(app_id=FBAPPID, app_secret=FBSECRET, code_parameter=code, redirect_uri="http://morss.it/:facebook/") + eurl = "https://graph.facebook.com/oauth/access_token?client_id={app_id}&redirect_uri={redirect_uri}&client_secret={app_secret}&code={code_parameter}".format(app_id=FBAPPID, app_secret=FBSECRET, code_parameter=code, redirect_uri=environ['SCRIPT_URI']) token = urlparse.parse_qs(urllib2.urlopen(eurl).read().strip())['access_token'][0] # get long-lived access token