user63898
user63898

Reputation: 30915

facebook-graph-api Getting "Invalid OAuth access token." after 3 https calls

Hi im trying to get group wall feeds , im using desktop application to get all the feeds but after 3 https api calls im getting :

{"error":{"type":"OAuthException","message":"Invalid OAuth access token."}}

this are my calls:

https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=30&offset=0

https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=60&offset=30

https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=90&offset=60

https://graph.facebook.com/175923872448029/feed?access_token=355xxxx|2575b794cd858xxxx-55xxx13|N-oGZ6q2sNDNgxxxxU-TDw&distance=100000&limit=120&offset=90 <-- this call gives me the error

the weird thing is that when im take this https call the one failed and run it in firefox , it does return me result any idea way ?

Upvotes: 10

Views: 64037

Answers (3)

DOT
DOT

Reputation: 1

For my case, I actually did it this way:

I have tried several ways, and I got the invalid OAuth access token error too. After getting my page access token using the Graph Explorer, I wrote this code:

pagetoken = 'EAAOSZBmdTKBMBAIf1FrTGmapagVZAvwdlrwSWNc3EZCOTXQ90Im9u'

mylikes = "https://graph.facebook.com/me?fields=likes.summary(true)&access_token"+pagetoken 

I then noticed an equal sign was missing, and that fixed my invalid OAuth access token error.

pagetoken = 'EAAOSZBmdTKBMBAIf1FrTGmapagVZAvwdlrwSWNc3EZCOTXQ90Im9u'

mylikes = "https://graph.facebook.com/me?fields=likes.summary(true)&access_token="+pagetoken 

I hope it helps anyone with the same issue.

Upvotes: 0

Roddy P. Carbonell
Roddy P. Carbonell

Reputation: 865

That happened to me for hours:

facebook-graph-api Getting “Invalid OAuth access token.”

In my case, the application was re-directing to a local address, and the URL authorized by Facebook was not local, so Facebook was not login me in.

The access_token for the user I was using was some old access_token kept in the script by window.sessionStorage. So I thought I was using the right access_token, but I was not.

Upvotes: -2

Sators
Sators

Reputation: 3126

You do not have proper authentication set. See: http://developers.facebook.com/docs/authentication/

Upvotes: 6

Related Questions