Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/facebook/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
imagejpeg()和PHP与JPEG扩展_Php_Facebook_Watermark - Fatal编程技术网

imagejpeg()和PHP与JPEG扩展

imagejpeg()和PHP与JPEG扩展,php,facebook,watermark,Php,Facebook,Watermark,在我的应用程序中,用户选择一张图片上传到他们的Facebook墙上。我使用自动添加水印。发生这种情况的页面称为test3.php。 当我尝试将其添加到用户墙时: $facebook->setFileUploadSupport(true); $photo = "test3.php"; $message = 'Test message'; $ret_obj = $facebook->api('/me/photos', 'POST', array(

在我的应用程序中,用户选择一张图片上传到他们的Facebook墙上。我使用自动添加水印。发生这种情况的页面称为test3.php。 当我尝试将其添加到用户墙时:

$facebook->setFileUploadSupport(true);
$photo = "test3.php";
$message = 'Test message';

$ret_obj = $facebook->api('/me/photos', 'POST', array(
                                        'source' => '@'.$photo,
                                        'message' => $message
                                       )
                                     );
我得到:uncaughtfacebookapiexception:无效参数,可能是因为test3.php没有图像扩展名


他们有办法让我解决这个问题吗?我曾尝试使用test3.php?testing.png来欺骗上传脚本,但也没有成功。

我确定源代码应该是完整的urlNo,它不会。我用image test.png尝试了这个脚本。使用htaccess并将您的url从test3.php?image=photo.jpg替换为test3/photo.jpg。然后为facebook使用替换的urlupload@RajivRisi这到底是怎么回事?我总是把重写规则弄乱。。。我应该在脚本上传脚本中添加什么$photo=test3/photo.jpg?问题不在于文件扩展名source“=>”@test3.php”意味着它将获取文件test3.php并上传该文件。