post comment on facebook newsfedd
I am developing a website of entertainment. Now client want that when user upload any video or image or any trake then a notification should be sent on facebook news feed. i have tried is --- my php code is:--
$attachment = array('message' => 'this is my message',
'name' => 'This is my demo Facebook application!',
'caption' => "Caption of the Post",
'link' => 'http://mylink.com',
'description' => 'this is a description',
);
$attachment = json_encode($attachment);
$result = $facebook->api('/me/feed/','post',$attachment);
but it give error on 开发者_开发问答facebook.php which i have downloded from https://github.com/facebook/php-sdk
You should have specify a canvas URL for the facebook app you're using un the sdk. Your links should then share a root URL with this canvas URL.
精彩评论