criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 176 forks source link

Extend long-term token #46

Closed Philmod closed 10 years ago

Philmod commented 10 years ago

Hey,

Is it possible to extend the long-term token?

When I use the extendAccessToken method, the expires response decreases. Does that mean that even the new token won't work after some time?

Thanks, Philmod

chrisjhoughton commented 10 years ago

Rather than add a new issue on this I thought I'd add to this discussion.

In the Facebook Docs they detail the exchange of temporary access tokens for permanent ones. There is nothing to suggest that a user's access token can be extended in any way.

As a result I got a little confused as to what the extendAccessToken was really doing - it's actually getting a new permanent access token, rather than extending the existing one.

Perhaps a change in method name to reflect this? E.g. getPermanentAccessToken?

Great module btw.

criso commented 10 years ago

That makes sense. Rather than change the name though, we would output a "deprecated" message on the old method, so that it won't break backwards compatibility and properly update the docs.

Not sure when I can get around to doing that, but if someone wants to put a pull request for that, it would be faaaantastic!

chrisjhoughton commented 10 years ago

Happy to do it at some point - give me a week or so!

FYI - this module is forming the backbone of my startup Sauce and it's all working fantastic. Was previously doing things all on the client side which was a heck of a lot slower!

criso commented 10 years ago

Awesome!

cyrusdavid commented 10 years ago

Was this issue fixed?

SimonEast commented 1 year ago

I've been searching everywhere for a way to get a permanent access token for server-side requests to the API, just to fetch a list of public posts from a page. I don't want to have to manually renew it every so often. Did anyone discover a way to do that?

The closest thing I've found is this: https://stackoverflow.com/a/58878246/195835 ...however it requires a long, laborious, manual review process to get a business account with a system user that never expires.

If anyone has a better solution I'd love to hear it.