Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Facebook: Post on behalf
<?php
$facebook = new Facebook(array(
'appId' => 'xxxxx',
'secret' => 'xxxxx'
)
);
$facebook->setExtendedAccessToken();
$access_token = $facebook->getAccessToken();
$post = array(
'access_token' => $access_token,
'message' => 'Please ignore || Development || Auto-Post'
);
//-- Send post to Facebook --//
$res = $facebook->api('/me/feed', 'POST', $post);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment