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

Error in facebook example in documentation #14

Closed
nilsga opened this issue Jun 16, 2011 · 0 comments
Closed

Error in facebook example in documentation #14

nilsga opened this issue Jun 16, 2011 · 0 comments

Comments

@nilsga
Copy link

nilsga commented Jun 16, 2011

The signature for findOrCreateUser in the facebook connect example is wrong:

.findOrCreateUser( function (session, accessToken, fbUserMetadata) {
    // find or create user logic goes here
  })

The step in the oauth2 module states:

.step('findOrCreateUser')
      //.optional()
      .accepts('session accessToken extra oauthUser')
      .promises('user')

So findOrCreateUser takes four parameters, the third being an "extra" parameter. The OAuth user is the fourth argument. So the example should read:

.findOrCreateUser( function (session, accessToken, extra, fbUserMetadata) {
    // find or create user logic goes here
  })

Otherwise, fbUserMetadata will be 'null' for facebook connect.

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