GithubHelp home page GithubHelp logo

Comments (7)

wayne-o avatar wayne-o commented on June 24, 2024

Can you show the relevant section of your waterlock.config file please :)

from waterlock-facebook-auth.

EslamMrwan avatar EslamMrwan commented on June 24, 2024

here you are :)
{
name: "waterlock-facebook-auth",
appId: "**********************",
appSecret: "**
********************",
redirectUri: 'http://localhost:1337/auth/facebook_oauth2',
fieldMap: {
'name': 'name',
'first_name': 'first_name',
'last_name': 'last_name',
'email': 'email',
'facebookId': 'id'
}
And /models/Auth.js
name: {
type: 'string'
},
first_name: {
type: 'string'
},
last_name: {
type: 'string'
},
email: {
type: 'string'
},
facebookId: {
type: 'integer'
}

from waterlock-facebook-auth.

wayne-o avatar wayne-o commented on June 24, 2024

strange... here is mine and it definitely works:

fieldMap: {
      'name': 'name',
      'email': 'email'
    }

I'll double check in a couple of hours when I've left work and get back to you but I'm pretty sure this stuff works...

from waterlock-facebook-auth.

EslamMrwan avatar EslamMrwan commented on June 24, 2024

hi wayne :)
do you checked it ?
and i have another question
fieldMap: {
'first_name': 'first_name',
'email': 'email'
}
it store first_name in Auth model . and i want store it User model
how i can do it
thanks advanced :)

from waterlock-facebook-auth.

ckclark avatar ckclark commented on June 24, 2024

Could it be related to https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/ ?

Fewer default fields for faster performance: To help improve performance on mobile network connections, we've reduced the number of fields that the API returns by default. You should now use the ?fields=field1,field2 syntax to declare all the fields you want the API to return.

Now I have to modify the getMe method in fboauth2.js to return more fields I wanted.

from waterlock-facebook-auth.

poacher2k avatar poacher2k commented on June 24, 2024

Now I have to modify the getMe method in fboauth2.js to return more fields I wanted.

It would be nice if the requested scope had a good default, but could be overridden in waterlock.js

from waterlock-facebook-auth.

Dransfield avatar Dransfield commented on June 24, 2024

What is the solution?
My waterlock code is:
{
name: "waterlock-facebook-auth",
appId: APPI_ID,
appSecret:'APP_SECRET',
fieldMap: {
'Picture':'picture',
'Cover':'cover',
'gender': 'gender'
}
},

but only name and facebookid are returned

in auth.js I have:
attributes: require('waterlock').models.auth.attributes({

/* e.g.
nickname: 'string'
*/
  firstName: 'string',
    lastName: 'string',
    gender: 'string',
    timezone: 'number',
    Picture:'string',
    Cover:'string'

The google+ picture is returned so it does work there.

from waterlock-facebook-auth.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.