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
Facebook Graph API v2.4 #675
Comments
+1 |
2 similar comments
+1 |
+1 |
I found solution:
UP of course you need to set scope also:
|
Thanks for your solution. How I can recover the email users who are already registered before the solution? |
Thanks highcat. Your solution seems to be working. |
Thanks! |
1 similar comment
Thanks! |
👍 Put in docs please. |
Thanks! Please, update the docs. |
and twitter? email = "" ? |
I tried setting |
If I work with facebook to twitter the issue is not cast me email |
I updated SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAM, but doesnt seem to work. |
|
As I remember, there was NO way to get email from twitter, Twitter API won't return it (and everybody was frustrated about that). |
@highcat. I found this: http://stackoverflow.com/questions/22627083/can-we-get-email-id-from-twitter-oauth-api It migh be worth trying. I have submitted a request. Let's see what happens. |
@christianmls the next time user logs in with facebook their email will be added to profile. |
Hi! @partial
def require_email(strategy, details, user=None, is_new=False, *args, **kwargs):
if user and user.email:
return
elif is_new and not details.get('email'):
if strategy.request_data().get('email'):
details['email'] = strategy.request_data().get('email')
return
if strategy.request.session.get('email', '') != '':
details['email'] = strategy.request.session['email']
return
fbuid = kwargs['response']['id']
token = kwargs['response']['access_token']
url = 'https://graph.facebook.com/{0}/?' \
'fields=email&access_token={1}'.format(fbuid, token)
resp = requests.get(url)
if resp.json().get('email'):
details['email'] = resp.json().get('email')
else:
return redirect('myapp:email-required') And in settings: SOCIAL_AUTH_PIPELINE = (
#...
'social.pipeline.social_auth.social_user',
'myapp.pipeline.require_email'
#...
) |
It works for for facebook but not for LinkedIn. What is the solution for LinkedIn? |
@harun1393 Hi Harun, could you provide the stack trace? |
Hi, My problem solved for LinkedIn also. I have done some mistake to write settings |
Facebook API is already updated, currently version is 2.8. |
Thank you
2016-12-27 3:03 GMT+06:00 Matías Aguirre <notifications@github.com>:
… Facebook API is already updated, currently version is 2.8.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#675 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJGe41m-jxSSiKwgNAxRmXwYLRlgUKLAks5rMCuRgaJpZM4FWB96>
.
--
হারুন অর রশিদ
স্বেচ্ছাসেবক, এফওএসএস বাংলাদেশ
|
Hi, How get email in Facebook API v3.1? |
Facebook updates it API recently,
it seems that the way to get extra scope is not working now.
e.g. setting SOCIAL_AUTH_FACEBOOK_SCOPE = ['email']
does not return the email.
here's the link to graph API v2.4
https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/?ref=hp
The text was updated successfully, but these errors were encountered: