如何将基于自定义 SWF 的音频播放器嵌入到 facebook 墙帖中? [英] How to embed a custom SWF based audio player into facebook wall posts?

查看:23
本文介绍了如何将基于自定义 SWF 的音频播放器嵌入到 facebook 墙帖中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个基于 SWF 的音频播放器.我们希望能够将此播放器嵌入 Facebook 墙帖,就像将 Youtube 视频或 BandPage 歌曲嵌入 Facebook 动态墙一样.现在点击我们提供的图片会重定向到播放器,而不是直接加载播放器.

We have an SWF based audio player. We want to be able to embed this player into Facebook wall posts in the same way that Youtube videos or BandPage songs are embedded into Facebook feed walls. Right now clicking on the image that we provide redirects to the player instead of loading the player inline.

更新:我们希望像 BandPage 那样嵌入我们的 SWF 播放器.我们希望在我们的图像顶部有一个小播放按钮.我们还希望保留日期的小符号.

UPDATE: We want to embed our SWF player like BandPage does it. We want to have the little play button on top of our image. We also want to have the small symbol left to the date.

点击图片或播放按钮,然后内嵌加载 SWF.

Clicking on the image or play button then loads the SWF inline.

如何使用 Facebook JavaScript API 实现这一点?真的只是被列入白名单的问题吗?还是我必须提供更多参数?

How can I achieve this with the Facebook JavaScript API? Is it really just a matter of being white listed? Or do I have to provide more parameters?

这就是我现在所拥有的:

This is what I have right now:

function fb_post()
{
    var message = 'Look at my fantastic SWF!';
    var picture = 'A LINK TO A 100X100 IMAGE';
    var link = 'A LINK TO OUR SWF';
    var source = 'A LINK TO OUR SWF';
    var name = 'Blah blah';
    var caption = 'Yada yada yada';
    var description = 'Facebook programming';
    var type = 'swf';

    FB.api('/me/feed', 'post', { message: message, picture: picture, link: link, name: name, type: type }, function(response) {
     if (!response || response.error) {
         alert('Error occured: ' + response.error.message);
        } else {
         alert('Post ID: ' + response);
        }
    });
}

更新:现在可以使用了!我们的图像上有播放按钮,SWF 已加载并显示在 Facebook 墙上 :) 不过我们还没有让它与 FB.api 一起使用.我们正在使用 FB.ui.

UPDATE: It's working now! We've got the play button on our image and the SWF is loaded and displayed in the Facebook wall :) We haven't got it working with FB.api though. We are using FB.ui.

将此表单用于视频嵌入白名单请求.我们不得不等待不到一周的时间才能将我们的网址列入白名单.

Use this form for the Video Embed Whitelist Request. We had to wait less than a week to get our URLs whitelisted.

推荐答案

您需要将您的域列入白名单.这是表格:http://www.facebook.com/help/contact.php?show_form=video_embed_whitelist

You need your domain being white listed. Here is the form: http://www.facebook.com/help/contact.php?show_form=video_embed_whitelist

更新:您是否研究过this?这似乎满足了您的需求(伙计,您必须讨厌 FB 提供所有这些 API 和半开玩笑的文档)

Update: Have you looked into this? This seems to cover your needs (man, you gotta hate FB for putting up all of these API's and the half-arsed documentation)

这可能很有趣:

<meta property="og:video" content="http://www.example.com/player.swf?video_id=123456789"/> 
<meta name="video_height" content="200" /> 
<meta name="video_width" content="300" />
<meta name="video_type" content="application/x-shockwave-flash" />

这是视频播放器的示例,但它也适用于音频播放器.

It's the example for a video-player, but it should work for an audio-player as well.

另请阅读 OpenGraph 文档 - 有很多关于如何制作网站的信息脸书友好.

Also read the OpenGraph documentation - there is a lot of information on how to make your site Facebook-friendly.

这篇关于如何将基于自定义 SWF 的音频播放器嵌入到 facebook 墙帖中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆