Search code examples
facebookfacebook-graph-apifacebook-php-sdk

Page ratings require Two Factor Authentication


I am using PHP SDK to fetch page ratings for different pages. I am able to fetch ratings from an App Page on facebook by hitting the

{page_id}/ratings

endpoint for the App Page. But when I hit the same endpoint for a restaurant page I get the following error

Facebook\Exceptions\FacebookResponseException (#200) User does not have sufficient administrative permission for this action on this page. If the page business requires Two Factor Authentication, the user also needs to enable Two Factor Authentication.

Does anyone have any idea why might this be happenning?


Solution

  • Turns out the issue was not related to the error at all.

    The problem was that I was passing the wrong Page Id from my code for the second page in the {page_id}\ratings endpoint.

    Anyone who comes across such error, do check that you are passing the right page id and page access token.