【发布时间】:2014-01-05 07:15:41
【问题描述】:
我有这段代码,我用它来使用 Graph api 将帖子安排到 Facebook:
$body = array(
'message' => $post->message,
'link' => site_url('index.php/cron/redirect/'.url_encode($post->id_cron)),
'picture' => 'http://img.youtube.com/vi/'.$post->picture.'/0.jpg',
'name' => $post->name,
'caption' => $post->caption,
'description' => $post->description,
'access_token' => $access_token,
'appsecret_proof' => hash_hmac('sha256', $access_token, $this->faceboook->app_secret),
'type' => 'video',
'source' => 'http://www.youtube.com/e/'.$post->picture
);
$relative_url = "/".$post->id_wall."/feed";
$batch = array('method' => 'POST', 'relative_url' => $relative_url, 'body' => http_build_query($body));
$facebook->api('?batch='.urlencode(json_encode($batch)), 'POST');
现在帖子已经成功发到群墙了,链接正确,缩略图正确,因为小播放按钮显示在缩略图的左下方,所以正在显示为视频。现在问题是我得到了
"Invalid Error: There was a problem with the parameters of the request"
每当我尝试点击缩略图时。预期的操作是帖子将打开一个播放器并在群组墙上播放视频。这里似乎有什么问题?谁能帮帮我?
【问题讨论】:
标签: facebook facebook-graph-api video youtube