Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/250.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
Javascript PHP中的后期图像_Javascript_Php_Curl_Linkedin Api - Fatal编程技术网

Javascript PHP中的后期图像

Javascript PHP中的后期图像,javascript,php,curl,linkedin-api,Javascript,Php,Curl,Linkedin Api,我正试图使用PHP CURL将图像文件作为参数发布到我的linkedIn墙上,但该图像不是我试图发布到linkedIn上的图像。我已尝试使用以下代码: $linkedinShareOptions = array( 'comment' => 'message', 'content' => array(

我正试图使用PHP CURL将图像文件作为参数发布到我的linkedIn墙上,但该图像不是我试图发布到linkedIn上的图像。我已尝试使用以下代码:

 $linkedinShareOptions = array( 
                              'comment' => 'message',   
                              'content' => array(
                                               'title'  => 'TITLE',
                                               'description'  => 'hello world', 
                                               'submitted-url'  => $redirectUrl, 
                                               'submitted-image-url' => $imageSavedUrl
                                               ), 
                              'visibility'=> array('code' => 'anyone') 
                             );

 $linkedinShareOptions = json_encode($linkedinShareOptions);
 curl_setopt_array( $curl, array( 
                                  CURLOPT_URL            => CURL_OPT_URL,
                                  CURLOPT_RETURNTRANSFER => true,
                                  CURLOPT_CUSTOMREQUEST  => "POST",
                                  CURLOPT_SSL_VERIFYPEER => false,
                                  CURLOPT_POST           => true,
                                  CURLOPT_HTTPHEADER     => array(
                                                                'x-li-format: json',
                                                                'Content-Type: application/json'
                                                                ),
                                  CURLOPT_POSTFIELDS     => $linkedinShareOptions
                                )
                  );
 $jsonResponseString = curl_exec( $curl );
 $httpResponseCode = curl_getinfo( $curl, CURLINFO_HTTP_CODE );
 curl_close( $curl );

 $linkedinResponse = json_decode( $jsonResponseString );
我想发布的图像保存在服务器中,与提交的图像URL的URL相同,但发布成功后,显示另一个图像


请帮我解决这个问题。

你说的“另一张”是什么意思?我的网站的主页截屏正在拍摄您服务器上的随机图像