【发布时间】:2014-07-15 05:32:28
【问题描述】:
我使用 php sdk 在 facebook 上分享了链接。我在帖子中获得了 Facebook 固定大小的图像。但我想在我的帖子上使用原始图像大小。下面是我的脚本。
<?php
require_once('facebook.php');
$config = array(
'appId' => 'xxxxx',
'secret' => 'xxx',
'allowSignedRequest' => true // optional but should be set to false for non-canvas apps
);
$facebook = new Facebook($config);
$user_id = $facebook->getUser();
$access_token= $facebook->getAccessToken();
if($user_id!='')
{
try {
$facebook->api('/me/feed', 'POST', array( 'access_token' => $access_token, 'message' => 'Omg escape Games', 'link' => 'https://apps.facebook.com/omgescape/', 'picture' => 'https://www.omgescape.com/images/Johnny-320x300-jpg.jpg', 'name' => 'Jane Maxwell', 'caption' => 'Play this', 'description' => 'Play games on OMG Escape' ));
echo 'Successfully posted to Facebook Fan Page';
}
catch(Exception $e) {
echo $e->getMessage();
}
}
?>
当我使用 php sdk 通过 facebook api 分享链接时,我得到了如下图。
但我想在帖子中使用原始图像大小。如何做到这一点
【问题讨论】:
标签: facebook-graph-api facebook-php-sdk