Created
August 23, 2014 12:56
-
-
Save niraj-shah/65737247aa70c5c1d4c0 to your computer and use it in GitHub Desktop.
Get Page Access Token for a given Facebook Page. Using Facebook PHP SDK 4.0.x.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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