Skip to content

Instantly share code, notes, and snippets.

@pietromalerba
Forked from niraj-shah/page_token.php
Last active August 29, 2015 14:12
Show Gist options
  • Save pietromalerba/40d0a55511cbbe534da3 to your computer and use it in GitHub Desktop.
Save pietromalerba/40d0a55511cbbe534da3 to your computer and use it in GitHub Desktop.
<?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