Created
July 12, 2014 22:54
-
-
Save SecureCloud-biz/3cba476d1ef15c1c7f08 to your computer and use it in GitHub Desktop.
Using a ID from taggable_friends to post Status Update using Graph API 2.0 and Facebook PHP SDK 4.0.x
This file contains hidden or 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 | |
// publish story, requires 'places' attribute | |
// use a page_id with no address to tag hidden location | |
// $tags is a comma-separated string of IDs | |
$story = (new FacebookRequest( $session, 'POST', '/me/feed', array( | |
'message' => 'test', 'tags' => $tags, 'place' => '195383960551614' | |
) ))->execute()->getGraphObject()->asArray(); | |
// returns post_id | |
echo '<pre>' . print_r( $story, 1 ) . '</pre>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment