首页 文章

如何通过应用程序将Flash视频源发布到Facebook页面

提问于
浏览
0

我正在尝试将我们的应用程序中的视频发布到Facebook后面的api页面:https://developers.facebook.com/docs/reference/api/page/

但facebook返回以下回复{“error”:{“message”:“(#353)缺少视频文件”,“类型”:“OAuthException”,“code”:353}}

这就是我在浏览器中输入的内容:https://graph-video.facebook.com/ /videos?access_token=&source=https://www.youtube.com/v/ZVKc8KGPKFM&method=post

但它仍然带有相同的消息,有谁知道缺少什么?谢谢

1 回答

  • 2

    这是我将视频链接到Facebook页面的方式 .

    $url='https://graph.facebook.com/'.$page_id.'/feed?access_token='.$facebook_page_access_token;
    
            $args = array(
           'message' => $message,
            'link' => 'http://www.youtube.com/watch?v='.$video_id,
            'source' => 'http://www.youtube.com/e/'.$video_id,
            'picture' => 'http://img.youtube.com/vi/'.$video_id.'/0.jpg'
            );
    
            $this->_curl = curl_init();
    
            curl_setopt($this->_curl,CURLOPT_POST,TRUE);  
            curl_setopt($this->_curl,CURLOPT_URL,$url);
            curl_setopt($this->_curl, CURLOPT_POSTFIELDS, $args);
                curl_exec($this->_curl);
    

    确保在参数中添加“source” . 否则它将在facebook中显示为普通链接(即post_type = api响应中的链接)

相关问题