0

我正在尝试使用 PHP SDK 发布视频。使用“feed”方法,然后我会展示你正在使用的代码。我用的是flv视频。

$response = $this->facebook->api('/me/feed/', 'POST', array(
                'message' => 'My custom message',
                'name' => 'Whatever name',
                'description' => 'Whatever description',
                'link' => 'http://localhost/my_proyect/',
                'picture' => 'http://localhost/my_proyect/my_image.png',
                'source' => 'http://localhost/my_proyect/videos/my_video.flv',
                'actions' => array(
                    array(
                        'name' => 'Some Actions',
                        'link' => 'http://localhost/my_proyect/'
                    )
                ),
                'caption' => 'Cool Video'
                    ));
echo json_encode($response);

在我的 HTML 中,我放置了 FB 元标记。

<!-- FB Meta Tags -->
        <meta property="fb:app_id" content="xxxxxxxxxxxxx" />
        <meta property="og:url" content="http://localhost/my_proyect/" />
        <meta property="og:video" content="http://localhost/my_proyect/videos/my_video.flv" />
        <meta property="og:video:height" content="640" />
        <meta property="og:video:width" content="385" />
        <meta property="og:video:type" content="application/x-shockwave-flash" />
        <!-- FB Meta Tags END -->

当我看到回复时。返回一个 ID 为 post 的数组。

当我看到用户的墙时,只看到带有文本的帖子,而不是嵌入的视频或图像。

我在代码中做错了什么?我需要传递一个播放器还是默认播放我的视频的播放器?或者因为我在本地主机上而不工作?

提前致谢。

4

0 回答 0