使用以下命令將視頻上傳到Facebook。如果我改變curl
形成後它的工作原理php - Facebook Video Upload Curl
"error":{"message":"(#353) You must select a video file to
upload.","type":"OAuthException","code":353}}
:
$video = "http://xxx.com/video.mp4";
$data = array('name' => 'file', 'file' => $video,
'access_token' => $access_token, '_title' => $video_title,
'description' => $video_desc);
$post_url = "https://graph-video.facebook.com/" . $page_id . "/videos";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$res = curl_exec($ch);
我收到一個錯誤。關於爲什麼如此的任何想法?
你想出了最終的解決方案? – geevee
確實Facebook上傳視頻的網址? – wuliwong