I have the following code to generate a facebook post for a page using graph api.
$page_info = $facebook->api("/$pageId?fields=access_token");
if (!empty($page_info['access_token'])) {
$attachment = array(
'access_token' => $page_info['access_token'],
'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);
Posts from one of my facebook pages look like below image.
link to image - How my posts look
Then i came across some other pages, whose posts look like below image. As you can see, these preview images are large and appear above the post. When we click them, we are redirected to another website's page. So i had to assume, we are not posting this as image. Please note that i need to post my link, big thumbnail and my custom description as shown in this image.
How to achieve this?
bigger images in facebook posts when posting
Use the Open Graph to create the custom stories.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.