Git Product home page Git Product logo

node-facebook-sdk's People

Contributors

8bitdesigner avatar tenorviol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-facebook-sdk's Issues

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('; ');
};

Standalone usage requires request/response/domain, but not documented

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).

setSession / getSession not working properly (with ExpressJS)

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.

req.facebook.getSession() results in a duplicate charset on the response

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.

Document Additional Parameters

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.