Commit 73af8ff8 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Tomáš Peterka

slapos_web: Fix Facebook login on facebook-sdk 2.0.0

This is a follow up on the API change from the upgrade of facebook-sdk egg from version 0.4.0 to version 2.0.0.

On the version 0.4.0, the GraphAPI was implemented on v2.2 which is not supported anymore by facebook. With this commit we move to use GraphAPI on version v2.7.
parent a023aaee
......@@ -74,7 +74,7 @@ def Facebook_getServerToken(self, key):
return getServerToken(self, key, 'facebook_server_auth_token_cache_factory')
def Facebook_getAccessTokenFromCode(self, code, redirect_uri):
return facebook.get_access_token_from_code(code=code,
return facebook.GraphAPI(version="2.7").get_access_token_from_code(code=code,
redirect_uri=redirect_uri,
app_id=self.portal_preferences.getPreferredVifibFacebookApplicationId(),
app_secret=self.portal_preferences.getPreferredVifibFacebookApplicationSecret())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment