Get user access token with permission via php with FB sdk 3.2

I’m admin of a page and I have my app with ID and Secret.
When I go to Graph api Explorer I can easily take my User Access Token with permission “manage-pages“.
I need to take the same via php, using the FB sdk 3.2.
I managed to run only this:

    require 'src/facebook.php';
    $facebook = new Facebook(array(
        'appId'  => 'My app ID',
        'secret' => 'My app secret',
    ));

    //This token is: "My app ID|My app secret"
    print_r($facebook->getAccessToken());

How Can I get the user access token with permission via php with fb sdk 3.2?

Can somebody help me? Thank you!


Source: facebook

Leave a Reply