I tried to share posts automatically to my facebook page. It works perfectly, but I want to use bigger image to the shared post. http://cdn.tips4php.net/wp-content/uploads/2010/12/final_post.jpg
I used the following code to post it:
try {
$page_info = $facebook->api("/$pageId?fields=access_token");
$attachment = array(
'access_token' => $MYACCESTOKEN,
'message' => $msg,
'name' => $title,
'link' => $uri,
'description' => $desc,
'picture'=>$pic,
'actions' => json_encode(array('name' => $action_name,'link' => $action_link))
);
$status = $facebook->api("/$pageId/feed", "post", $attachment);
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
How can I use bigger picture to this post? I saw a few shared post from other facebook pages and they have large picture. Waiting for your answer..
The larger image is only displayed if the image / post was shared manually by an administrator. If you use the API, Facebook deliberately use the smaller image. Basically, Facebook want to promote manual sharing of content as opposed to automatic sharing.
Of the examples you've seen, do any of them have the "via xxx app" on them, like your screenshot? This is a giveaway on if the post was shared manually or via an application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With