0
FB 어플리케이션에 약간의 문제가 있습니다. 이 코드PHP API를 통해 fanpage에 비디오 업로드
{"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
, 나는 항상 오류가 있는지에 대해 그것은이다 또는 '출처'이지만 효과는 동일했습니다.
다음은 SDK와 함께 작동 예 (가 적절한 FB 권한을 요구 한 가정)입니다 –