Skip to content

Commit

Permalink
Add version to URL path for access_token
Browse files Browse the repository at this point in the history
  • Loading branch information
wumf-terra authored and martey committed Nov 5, 2016
1 parent 1f39b05 commit 0ac86c2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions facebook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def get_app_access_token(self, app_id, app_secret, offline=False):
'client_id': app_id,
'client_secret': app_secret}

return self.request("oauth/access_token",
return self.request(self.version + "/" + "oauth/access_token",
args=args)["access_token"]

def get_access_token_from_code(
Expand All @@ -306,7 +306,7 @@ def get_access_token_from_code(
"client_id": app_id,
"client_secret": app_secret}

return self.request("oauth/access_token", args)
return self.request(self.version + "/" + "oauth/access_token", args)

def extend_access_token(self, app_id, app_secret):
"""
Expand All @@ -322,7 +322,8 @@ def extend_access_token(self, app_id, app_secret):
"fb_exchange_token": self.access_token,
}

return self.request("oauth/access_token", args=args)
return self.request(self.version + "/" + "oauth/access_token",
args=args)

def debug_access_token(self, token, app_id, app_secret):
"""
Expand All @@ -339,7 +340,7 @@ def debug_access_token(self, token, app_id, app_secret):
"input_token": token,
"access_token": "{0}|{1}".format(app_id, app_secret)
}
return self.request("/debug_token", args=args)
return self.request(self.version + "/" + "debug_token", args=args)


class GraphAPIError(Exception):
Expand Down

0 comments on commit 0ac86c2

Please sign in to comment.