Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get Page Access Token for a given Facebook Page. Using Facebook PHP SDK 4.0.x.
<?php
// get page access token
$access_token = (new FacebookRequest( $session, 'GET', '/' . $page_id, array( 'fields' => 'access_token' ) ))
->execute()->getGraphObject()->asArray();
// save access token in variable for later use
$access_token = $access_token['access_token'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.