tenorviol / node-facebook-sdk Goto Github PK
View Code? Open in Web Editor NEWPort of Facebook's php sdk
Port of Facebook's php sdk
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('; ');
};
Standalone usage works over request, response and domain, but the documentation does not mention this.
This causes various errors such as with the following code:
var fbapp = new fbsdk.Facebook({
appId : 'YOUR APP ID',
secret : 'YOUR API SECRET'
});
fbapp.getLoginUrl();
Which causes an exception: "No request host available"
From what I gather, it is expected that one sets the aforementioned variables as configuration parameters like the appId and secret.
This has is the cause for a problem in my end; it would require an object per socket connection, whereas one would have been enough (the solution would be to have a different Facebook SDK instance each time).
The facebook.api() function returned error object saying the access token was required. So I traced the problem to two possible errors, one being returning the appId + the secret as access token in the getAccessToken function and other maybe the problem with getSession or setSession functions.
I need to use the facebook instant article SDK to convert my articles to the Apple news format so I want to know is it providing the instant article API?
I just integrated facebook-sdk with an Express app, and now the Expresso tests are failing with this error:
uncaught: AssertionError: Frontend: Homepage. Invalid response header Content-Type.
Expected: text/html; charset=utf-8
Got: text/html; charset=utf-8; charset=utf-8
Looks like the call to req.facebook.getSession() is doing something which results in a duplicate content type being set
app.use(function(req, res, next) {
if (req.facebook.getSession() || process.env.NODE_TEST == 'testing') {
next();
} else {
// some code here...
}
});
I glanced at the code, but I haven't the foggiest as to what's going on here.
Was wondering why limit and offset was not working...
You can't simply add to the url like so /.../feed?limit=2
You must use this syntax:
facebook.api('/.../feed', {limit:2}, function(data) { ... });
Also limit doesn't really seem to perform as expected, I get consistently less than the limit specified.
This may be an issue with fb itself trimming results before the response, as I've read on other pages.
active?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.