-
-
Save niraj-shah/a44515142b925e15508a to your computer and use it in GitHub Desktop.
Getting Taggable Friends 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 | |
// 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