我是FB marketing API的新手。 我使用php创建了一个处理adVideo创建的函数:
public function getUploadVideo() {
Api::init($this->appId, $this->appSecret,$this->token);
$video = new Advideo(null, 'act_' . $this->adAccountId);
$video->{AdVideoFields::SOURCE} = 'https://s3-us-west 2 .amazonaws.com /unittest-tvpage-com/testsuite/videos/big_buck_bunny.mp4';
$video->{AdVideoFields::NAME} = 'test_video';
$x = $video->create();
我使用的视频不需要任何权限,可以直接下载。 当我运行该函数时,我收到以下错误消息: 键入:FacebookAds \ Exception \ Exception 代码:26 消息:无法打开文件" https://s3-us-west-2.amazonaws.com/unittest-tvpage-com/testsuite/videos/big_buck_bunny.mp4"
为什么文件无法打开的任何想法? 感谢
答案 0 :(得分:0)
根据文档: https://developers.facebook.com/docs/marketing-api/reference/ad-account/advideos
要使用网址添加视频,请使用file_url
而不是source
。 source
参数用于上传文件。