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

后端 未结 3 358
一整个雨季
一整个雨季 2020-12-11 04:24

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\":\"OAut         


        
相关标签:
3条回答
  • 2020-12-11 04:54

    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.

    0 讨论(0)
  • 2020-12-11 05:15

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

    0 讨论(0)
  • 2020-12-11 05:16

    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.

    0 讨论(0)
提交回复
热议问题