When publishing picture to my FB page as an Admin using PHP, it appears as a thumbnail. I would like to appear it as full size picture
Code I'm using:
$page_info = $facebook->api("/$page_id?fields=access_token");
$page_access_token = $page_info['access_token'];
$data['picture'] = "image.jpg";
$data['link'] = "link";
$data['message'] = "message";
$data['access_token'] = $page_access_token;
$post_url = 'https://graph.facebook.com/'.$page_id.'/feed';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);
curl_close($ch);
Any help?
Here is How I would like it to be displayed - http://i.stack.imgur.com/0PUOS.png
Thank you
Thank you for the answers,
I tried remove the link but it didn't work. I searched more and tried the following code, but it gives me error >>>
Warning: curl_setopt_array() [function.curl-setopt-array]: open_basedir restriction in effect. File() is not within the allowed path(s): (/data/web/virtuals/17535/virtual) in /data/web/virtuals/17535/virtual/www/apps/fb/src/base_facebook.php on line 963 Fatal error: Uncaught CurlException: 3: No URL set! thrown in /data/web/virtuals/17535/virtual/www/apps/fb/src/base_facebook.php on line 994
require 'facebook.php';
$facebook = new Facebook(array(
'appId' => '111111111111',
'secret' => '222222222222222222',
'fileUpload' => true
));
$page_id = '3333333333333';
$page_info = $facebook->api("/$page_id?fields=access_token");
$page_access_token = $page_info['access_token'];
$image = "http://www.emperola.com/upload-01/18001-img_hero.jpg";
$args = array(
'access_token' => $page_access_token,
'message' => 'message',
'name' => 'Title',
'picture' => $image
);
$post_id = $facebook->api("/$page_id/feed","post",$args);
Thank you for your help