Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Using a ID from taggable_friends to post Status Update using Graph API 2.0 and 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
// 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
You can’t perform that action at this time.