我正在尝试使用用户个人资料照片创建一个fb应用。应用程序将生成图像应发布到用户Feed的新图像。我正在尝试使用“源”,但它无法正常工作。这不是完整的图像。它提供缩略图而不是发布完整图像。这是我的代码
$canvas = imagecreatetruecolor($crop_width,$crop_height);
imagecopy($canvas,$currentimage,0,0,0,0,$crop_width,$crop_height);
$test = $data['user_id'].'test.jpg';
imagejpeg($canvas, $test,100);
$new = imagecreatetruecolor(150,150);
imagecopyresized($new,$canvas,0,0,0,0,150,150,$w,$crop_height);
$resize1 = $data['user_id'].'resize1.jpg';
imagejpeg($new, $resize1 ,100);
$source1 = 'black.jpg';
$background = imagecreatefromjpeg($source1);
$resize = imagecreatefromjpeg($resize1);
imagecopy($background,$resize,100,250,0,0,150,150);
$output = $data['user_id'].'output.jpg';
imagejpeg($background,$output,100);
echo '<div align="center"><img src="'.$output.'"></div>';
unlink($test);
unlink($resize1);
$access_token = "ABCDEFGHIJKLM";
$graph_url ="https://graph.facebook.com/me/feed?access_token=".$access_token."&method=post&source=http://www.Google.es/images/srpr/nav_logo39.png&message=logo";
$user_permissions = json_decode(file_get_contents($graph_url));
print_r($user_permissions);
请帮助我,这解决了我创建一个完美的fb应用程序。