Permalink
Browse files

changed FB.options('redirect_uri') to FB.options('redirectUri')

  • Loading branch information...
1 parent a7f8d36 commit aed2785419c9896dd8721fe908b1898bdef8b663 @prabirshrestha prabirshrestha committed Mar 23, 2013
Showing with 5 additions and 5 deletions.
  1. +1 −1 README.md
  2. +1 −1 fb.js
  3. +3 −3 samples/scrumptious/routes/home.js
View
@@ -487,7 +487,7 @@ The existing options are:
* `'appSecret'` string representing the facebook application secret.
* `'timeout'` integer number of milliseconds to wait for a response. Requests that have not received a response in *X* ms. If set to null or 0 no timeout will exist. On timeout an error object will be returned to the api callback with the error code of `'ETIMEDOUT'` (example below).
-`'scope'` and `'redirect_uri'` have been whitelisted in options for convenience. These value will not be automatically
+`'scope'` and `'redirectUri'` have been whitelisted in options for convenience. These value will not be automatically
added when using any of the sdk apis unlike the above options. These are whitelisted so you can use it to pass values
using the same `FB` object.
View
2 fb.js
@@ -26,7 +26,7 @@
, 'appSecret': null
, 'timeout': null
, 'scope': null
- , 'redirect_uri': null
+ , 'redirectUri': null
}
, readOnlyCalls = {
'admin.getallocation': true
@@ -7,13 +7,13 @@ FB.options({
appId: config.facebook.appId,
appSecret: config.facebook.appSecret,
scope: config.facebook.scope,
- redirect_uri: config.facebook.redirectUri
+ redirectUri: config.facebook.redirectUri
});
function getFacebookLoginUrl () {
return 'https://www.facebook.com/dialog/oauth' +
'?client_id=' + FB.options('appId') +
- '&redirect_uri=' + encodeURIComponent(FB.options('redirect_uri')) +
+ '&redirect_uri=' + encodeURIComponent(FB.options('redirectUri')) +
'&scope=' + encodeURIComponent(FB.options('scope'));
}
@@ -45,7 +45,7 @@ exports.loginCallback = function (req, res, next) {
FB.api('oauth/access_token', {
client_id: FB.options('appId'),
client_secret: FB.options('appSecret'),
- redirect_uri: FB.options('redirect_uri'),
+ redirect_uri: FB.options('redirectUri'),
code: code
}, function (result) {
if(!result || result.error) {

0 comments on commit aed2785

Please sign in to comment.