if($user !== 0)
{
$info = $facebook->api('/me?fields=id,name,email,work');
$acces = $facebook->getAccessToken();
try
{
$publishStream = $facebook->api("/$user/feed", 'post', array(
'message' => "Hello {$info['name']}",
'name' => 'Test Run',
'description'=> 'This post was sent automatically',
'access_token' => $acces
));
?>
<br />
<div><?php echo $publishStream; ?></div>
<br />
<?php
}
catch (FacebookApiException $e) {
$result = $e->getResult();
?>
<div>failed : <?php echo $result; ?></div>
<?php
}
This is the code I am using to send a dummy post to my wall when I run the facebook app but the the post to user's feed fails and the error returned is "Array", is there anything in particular being done wrong?