Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

facebook-node-sdk

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

facebook-node-sdk - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

15

lib/basefacebook.js

@@ -35,2 +35,9 @@ var https = require('https');

BaseFacebook.prototype.sessionNameMap = {
access_token: 'access_token',
user_id: 'user_id',
code: 'code',
state: 'state'
};
BaseFacebook.prototype.getRequestParam = function(key) {

@@ -934,3 +941,9 @@ if (!this.request) {

delete parts.query;
parts.search = '?' + params.filter(function(param) { return self.shouldRetainParam(param) }).join('&');
parts.search = '';
params = params.filter(function(param) { return self.shouldRetainParam(param) });
if (params.length > 0) {
parts.search = '?' + params.join('&');
}
}

@@ -937,0 +950,0 @@

6

lib/facebook.js

@@ -33,4 +33,6 @@ var util = require('util');

if (this.hasSession) {
for (var name in this.request.session) {
this.clearPersistentData(name);
for (var name in this.sessionNameMap) {
if (this.sessionNameMap.hasOwnProperty(name)) {
this.clearPersistentData(this.sessionNameMap[name]);
}
}

@@ -37,0 +39,0 @@ }

{
"name": "facebook-node-sdk",
"version": "0.1.0",
"version": "0.1.1",
"description": "Node.js SDK for the Facebook API",

@@ -5,0 +5,0 @@ "tags": ["facebook"],

@@ -188,2 +188,18 @@ var path = require('path');

facebook = new TransientFacebook({
appId: config.appId,
secret: config.secret,
request: {
connection: {
},
headers: {
host: 'www.test.com'
},
url: '/unit-tests.php?state=hoge'
}
});
currentUrl = facebook.getCurrentUrl();
assert.equal('http://www.test.com/unit-tests.php', currentUrl);
done = true;

@@ -190,0 +206,0 @@ },

@@ -31,2 +31,31 @@ var path = require('path');

clearAllPersistentData: function(beforeExit, assert) {
var done = false;
beforeExit(function() { assert.ok(done) });
var app = express.createServer();
app.configure(function () {
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.session({ secret: 'foo bar' }));
app.use(Facebook.middleware(config));
});
// Test clearAllPersistentData don't break session
app.get('/', function(req, res) {
req.facebook.clearAllPersistentData();
if (req.session.cookie) {
res.send('ok');
}
else {
res.send('ng');
}
});
assert.response(app, { url: '/' }, function(res) {
assert.equal(res.body, 'ok');
done = true;
});
},
middleware: function(beforeExit, assert) {

@@ -33,0 +62,0 @@ var done = false;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc