Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #20 #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyfb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import auth
from urlparse import parse_qsl
from utils import Json2ObjectsFactory

import json
class FacebookClient(object):
"""
This class implements the interface to the Facebook Graph API
Expand Down Expand Up @@ -135,12 +135,12 @@ def get_access_token(self, app_secret_key, secret_code, redirect_uri):
url = "%s%s" % (self.BASE_TOKEN_URL, url_path)

data = self._make_request(url)

data = json.loads(data)
if not "access_token" in data:
ex = self.factory.make_object('Error', data)
raise PyfbException(ex.error.message)

data = dict(parse_qsl(data))
# data = dict(parse_qsl(data))
self.access_token = data.get('access_token')
self.expires = data.get('expires')
return self.access_token
Expand Down