Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't reset access token in-state #26

Closed
individual11 opened this issue Dec 24, 2012 · 2 comments
Closed

Can't reset access token in-state #26

individual11 opened this issue Dec 24, 2012 · 2 comments

Comments

@individual11
Copy link

Running something where I need to change the access token on the fly, but they way the code is, once it's set, it never looks for it again to change.

Something like this should do the trick

if(options('accessToken') && params.access_token != options('accessToken')) {
...etc

@prabirshrestha
Copy link
Contributor

It is documented in README.md

If you want to use the api compaitible with FB JS SDK, pass access_token as parameter.

FB.api('me', { fields: ['id', 'name'], access_token: 'access_token' }, function (res) {
    console.log(res);
}

Are you sure you are using this facebook-node-sdk (npm install fb)? There is no params.access_token != options('accessToken') comparison at all in our code.

@individual11
Copy link
Author

It works fine using the example you provided. The error was occurring when I was using FB.setAccessToken('access_token'); ... it would never let me reset it to anything else once set.

The code I sent is not present in the code, it's a replacement I think it would solve the problem I found.

Thanks much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants