Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Last active August 29, 2015 14:02
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save niraj-shah/a44515142b925e15508a to your computer and use it in GitHub Desktop.
Getting Taggable Friends using Facebook PHP SDK 4.0.x
<?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