10

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 ?

user63898
  • 29,839
  • 85
  • 272
  • 514

3 Answers3

6

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

Sators
  • 2,746
  • 1
  • 20
  • 26
  • This is strange. How can one test an app and check authentication issues before submitting? – Shailen May 24 '15 at 20:19
  • I'm having similar issue now with FB messenger. You need special approval to send messages, but can't develop/test the app without that approval. – dcsan Jul 07 '16 at 18:41
  • to answer question asked by @shailenTJ if you know the access token you can check permissions at `https://developers.facebook.com/tools/debug/accesstoken/` – CrandellWS Sep 24 '19 at 20:05
0

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.

Bhadresh Kathiriya
  • 3,147
  • 2
  • 21
  • 41
DOT
  • 1
  • 1
-2

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.

Roddy P. Carbonell
  • 858
  • 1
  • 11
  • 16