An active access token must be used to query information about the current user

后端 未结 2 604
别跟我提以往
别跟我提以往 2020-12-29 09:00

I keep getting the error in the title, while using a simple code:

require_once(\'sdk/src/facebook.php\');
require_once(\"AppInfo.php\");
function idx(array $         


        
2条回答
  •  一个人的身影
    2020-12-29 09:30

    You need to set the access token to be able to get data or act on behalf of the user. Are you going through a login flow to allow authorization to your Facebook application?

    Try the example at https://developers.facebook.com/docs/reference/php/facebook-api/

    It provides the very basic login flow that will grant access to the data you're seeking.

提交回复
热议问题