why does posting to facebook page yield “user hasn't authorized the application”

前端 未结 4 1750
猫巷女王i
猫巷女王i 2020-11-28 12:26

I have read the fb docs and written code to publish a message to a facebook \"page\", however I am getting an error that I don\'t expect to see:

(#200) The u         


        
4条回答
  •  醉梦人生
    2020-11-28 12:43

    You should add permission called status_update, for example

    https://www.facebook.com/dialog/permissions.request?_path=permissions.request&app_id=145634995501895&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html%3Fdisplay%3Dpage&response_type=token&fbconnect=1&perms=status_update&from_login=1&m_sess=1&rcount=1

    enter image description here

    and i'm able post to page i liked with the access token i get just now: enter image description here

    If you want to post as the admin of the page, you're require both manage_pages and status_update permissions, for example

    https://www.facebook.com/dialog/permissions.request?_path=permissions.request&app_id=145634995501895&redirect_uri=https%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html%3Fdisplay%3Dpage&response_type=token&fbconnect=1&perms=manage_pages%2Cstatus_update&from_login=1&m_sess=1&rcount=1

    enter image description here

    Cheers

提交回复
热议问题