stream_publish () takes more than two arguments:
stream_publish($message, $attachment = null, $action_links = null, $target_id = null, $uid = null)
Where $ target_id is the user or page on which you are posting to , and $ uid is the user or page that is posting, and which by default matches your session ID. To be completely explicit, I think you need to try
<?php require_once 'facebook.php'; $appapikey = 'xxxxxxx'; $appsecret = 'xxxxxxx'; $facebook = new Facebook($appapikey, $appsecret); $user_id = $facebook->require_login(); $message = "Will this status show up and allow me to dominate the world?!"; echo $user_id; $facebook->api_client->stream_publish($message,null,null,$user_id,$user_id);
An alternative form may be:
$app_id = 'xxxxxxx'; $facebook->api_client->stream_publish($message,null,null,$user_id,$app_id);
source share