facebook-node-sdk
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -297,2 +297,4 @@ var https = require('https'); | ||
* @return string The URL for the login flow | ||
* | ||
* @throws Error | ||
*/ | ||
@@ -343,4 +345,13 @@ BaseFacebook.prototype.getLoginUrl = function(params) { | ||
else { | ||
try { | ||
var currentUrl = self.getCurrentUrl(); | ||
} | ||
catch (err) { | ||
callback(err, null); | ||
callback = null; | ||
return; | ||
} | ||
callback(null, 'https://www.facebook.com/logout.php?' + querystring.stringify( | ||
self.mergeObject({ next: self.getCurrentUrl(), access_token: accessToken }, params))); | ||
self.mergeObject({ next: currentUrl, access_token: accessToken }, params))); | ||
callback = null; | ||
@@ -361,2 +372,4 @@ } | ||
* @return string The URL for the logout flow | ||
* | ||
* @throws Error | ||
*/ | ||
@@ -565,3 +578,2 @@ BaseFacebook.prototype.getLoginStatusUrl = function(params) { | ||
* @return mixed The decoded response object | ||
* @throws FacebookApiException | ||
*/ | ||
@@ -613,3 +625,2 @@ BaseFacebook.prototype.restserver = function(params, callback) { | ||
* @return mixed The decoded response object | ||
* @throws FacebookApiException | ||
*/ | ||
@@ -902,3 +913,10 @@ BaseFacebook.prototype.graph = function(/* path, method, params, callback */) { | ||
if (!redirectUri) { | ||
redirectUri = this.getCurrentUrl(); | ||
try { | ||
redirectUri = this.getCurrentUrl(); | ||
} | ||
catch (err) { | ||
callback(err, null); | ||
callback = null; | ||
return; | ||
} | ||
} | ||
@@ -953,2 +971,3 @@ | ||
* @return string The current URL | ||
* @throws Errror | ||
*/ | ||
@@ -1028,3 +1047,2 @@ BaseFacebook.prototype.getCurrentUrl = function() { | ||
* @return string The decoded response object | ||
* @throws FacebookApiException | ||
*/ | ||
@@ -1031,0 +1049,0 @@ BaseFacebook.prototype.oauthRequest = function(host, path, params, callback) { |
@@ -65,3 +65,12 @@ var util = require('util'); | ||
if (user === 0) { | ||
res.redirect(req.facebook.getLoginUrl(config)); | ||
try { | ||
var loginUrl = req.facebook.getLoginUrl(config) | ||
} | ||
catch (err) { | ||
next(err); | ||
next = null; | ||
return; | ||
} | ||
res.redirect(loginUrl); | ||
next = null; | ||
} | ||
@@ -68,0 +77,0 @@ else { |
{ | ||
"name": "facebook-node-sdk", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Node.js SDK for the Facebook API", | ||
@@ -5,0 +5,0 @@ "tags": ["facebook"], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
88217
11
2561
1
49