Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Getting Taggable Friends using Facebook PHP SDK 4.0.x
// requires Facebook PHP SDK 4.0.x or later
// user must be logged-in prior to API call
// get taggable friends
$taggable = (new FacebookRequest( $session, 'GET', '/me/taggable_friends' ))->execute()->getGraphObject()->asArray();
// output response
echo '<pre>' . print_r( $taggable, 1 ) . '</pre>';
// output total friends
echo count( $taggable['data'] );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment