Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update README.

  • Loading branch information...
commit 01f26fa510177a143aeba5d46a116ca291c0e59c 1 parent 063f26c
@jaredhanson authored
Showing with 8 additions and 37 deletions.
  1. +8 −37 README.md
View
45 README.md
@@ -9,7 +9,7 @@ unobtrusively integrated into any application or framework that supports
[Connect](http://www.senchalabs.org/connect/)-style middleware, including
[Express](http://expressjs.com/).
-## Installation
+## Install
$ npm install passport-facebook
@@ -43,11 +43,7 @@ For example, as route middleware in an [Express](http://expressjs.com/)
application:
app.get('/auth/facebook',
- passport.authenticate('facebook'),
- function(req, res){
- // The request will be redirected to Facebook for authentication, so
- // this function will not be called.
- });
+ passport.authenticate('facebook'));
app.get('/auth/facebook/callback',
passport.authenticate('facebook', { failureRedirect: '/login' }),
@@ -65,11 +61,7 @@ For example, this authorization requests permission to the user's statuses and
checkins:
app.get('/auth/facebook',
- passport.authenticate('facebook', { scope: ['user_status', 'user_checkins'] }),
- function(req, res){
- // The request will be redirected to Facebook for authentication, with
- // extended permissions.
- });
+ passport.authenticate('facebook', { scope: ['user_status', 'user_checkins'] }));
#### Display Mode
@@ -78,10 +70,7 @@ specifying the `display` option. Refer to Facebook's [OAuth Dialog](https://dev
documentation for more information.
app.get('/auth/facebook',
- passport.authenticate('facebook', { display: 'touch' }),
- function(req, res){
- // ...
- });
+ passport.authenticate('facebook', { display: 'touch' }));
#### Profile Fields
@@ -98,9 +87,8 @@ strategy like this.
// 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.
+If `profileFields` is not specified, the default fields supplied by Facebook
+will be parsed.
## Examples
@@ -130,23 +118,6 @@ this issue.
## License
-(The MIT License)
-
-Copyright (c) 2011 Jared Hanson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+[The MIT License](http://opensource.org/licenses/MIT)
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Copyright (c) 2011-2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
Please sign in to comment.
Something went wrong with that request. Please try again.