node-facebook-sdk
node-facebook-sdk copied to clipboard
Does not work with current connect versions + Solution
Reason: There is no require('connect').utils.serializeCookie() anymore.
Solution: Change the call require('connect').utils.serializeCookie(...) [Line 603] to serializeCookie(...) and declare the following function (taken from an old connect version):
var serializeCookie = function(name, val, obj){
var pairs = [name + '=' + encodeURIComponent(val)],
obj = obj || {};
if (obj.domain) pairs.push('domain=' + obj.domain);
if (obj.path) pairs.push('path=' + obj.path);
if (obj.expires) pairs.push('expires=' + obj.expires.toUTCString());
if (obj.httpOnly) pairs.push('httpOnly');
if (obj.secure) pairs.push('secure');
return pairs.join('; ');
};
ok, patched locally but heroku still has an automated mode_modules fetching, which always grabs the outdated script from npmjs repos. any clue on that?
You could use something like this in your package.json:
"repository" :
{ "type" : "git",
"url" : "http://github.com/cgencer/patched-node-facebook-sdk.git"
}
(see https://npmjs.org/doc/json.html)
But that's just a work-around. tenorviol would have to apply the modification to the code in his repo.