Browse files

Documentation on `profileFields` use

  • Loading branch information...
1 parent d3eef83 commit cfd162ba7ad7e1d2f32bc029fae341e3605a4f23 @stevebest stevebest committed Jun 28, 2012
Showing with 19 additions and 0 deletions.
  1. +19 −0
@@ -83,6 +83,25 @@ documentation for more information.
// ...
+#### Profile Fields
+The Facebook profile is very rich, and may contain a lot of information. The
+strategy can be configured with a `profileFields` parameter which specifies a
+list of fields (named by Portable Contacts convention) your application needs.
+For example, to fetch only user's facebook ID, name, and picture, configure
+strategy like this.
+ passport.use(new FacebookStrategy({
+ // clientID, clientSecret and callbackURL
+ profileFields: ['id', 'displayName', 'photos']
+ },
+ // verify callback
+ ));
+The `profile` object of verify callback will only include listed fields. If
+`profileFields` are not specified, strategy will fill the `profile` object
+with fields that facebook returns by default.
## Examples
For a complete, working example, refer to the [login example](

0 comments on commit cfd162b

Please sign in to comment.