FBアプリケーションに少し問題があります。それは私がいつもエラーを受け取ることについてです:
{"error":{"message": "(#353)Missing video file"、 "type": "OAuthException"、 "code":353}}
このコードで:
$post_url = "https://graph-video.facebook.com/xxx/videos?"
. "title=" . $video_title . "&description=" . $video_desc
. "&access_token=" . $access_token;
$ch = curl_init();
$data = array(
'source' => 'http://x/upload/' . $name . '.' . $type,
'file' => './upload/' . $name . '.' . $type,
'type' => 'avi',
);
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
if (!$response)
{
print_r(Debug::vars(array(curl_error($ch), curl_errno($ch))));
}
curl_close($ch);
ファイルが存在し、access_tokenは有効であり、アプリとしてログに記録され$data
ます。「file」または「source」のみを設定しようとしましたが、効果は同じでした。