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

no 'email ' in facebook_data #599

Open
krzysztof-adamski opened this issue Aug 8, 2017 · 1 comment
Open

no 'email ' in facebook_data #599

krzysztof-adamski opened this issue Aug 8, 2017 · 1 comment

Comments

@krzysztof-adamski
Copy link

facebook_data = converter.facebook_profile_data() is without 'email'

JS SDK

FB.api('/me?fields=name,email', function(response) {
console.log(response);
});

`
@classmethod
def _convert_facebook_data(cls, facebook_profile_data, username=True):
'''
Takes facebook user data and converts it to a format for
usage with Django
'''
user_data = facebook_profile_data.copy()
profile = facebook_profile_data.copy()
website = profile.get('website')
if website:
user_data['website_url'] = cls._extract_url(website)

    user_data['facebook_profile_url'] = profile.get('link')
    user_data['facebook_name'] = profile.get('name')

NO EMAIL !!!!! WHY ????

    if len(user_data.get('email', '')) > 75:
        # no more fake email accounts for facebook
        del user_data['email']

`

Please add the option to set the API version in OpenFacebook
Creating an account with form filling for a model is nonsense - it is no 'login via facebook'.
How to make automatic registration without email ???

@mach24
Copy link
Contributor

mach24 commented Oct 20, 2017

It looks like the email does not appear because of the note mentioned in this bug: https://developers.facebook.com/bugs/298946933534016/ . Since OpenFacebook just puts v1.0 as the API version, which is unsupported, Facebook automatically changes it to v2.5. The note in the page above says that all fields must be explicitly given in any API call. Maybe adding email to the API calls in OpenFacebook will fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants