I am using facebook-php-sdk and my requirement is to post a story to the user's wall. My app requests the user for 'publish_stream' permission at the time of signup/login. After user has allowed the permission and logged in, somehow I am not able to publish to facebook wall a new comment created by the user on my app. This is the error I get:
Invalid OAuth access token signature
This is what I do:
$facebook = new Facebook(array(
'appId' => "$fb_app_id",
'secret' => "$fb_secret",
'cookie' => true
));
try {
$fb_user_id = $facebook->getUser();
$access_token = $facebook->getAccessToken();
$facebook->api("/me/feed", 'post', array(
'access_token' => $access_token,
'message' => 'I love SO',
'link' => 'http://mydomain.com',
'picture' => 'http://thinkdiff.net/ithinkdiff.png',
'name' => 'iOS Apps & Games',
'description'=> 'Checkout iOS apps and games from iThinkdiff.net. I found some of them are just awesome!'
)
);
} catch (FacebookApiException $e) {
echo '<pre>'.htmlspecialchars(print_r($e, true)).'</pre>';
}
Do share your thoughts please