我的 FB 应用程序有一点问题。这是关于我总是得到错误:
{"error":{"message":"(#353) 缺少视频文件","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
我尝试仅设置“文件”或“源”但效果相同。