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

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

问题描述

我们有一个基于SWF的音频播放器。我们希望能够将这个播放器嵌入到Facebook墙上的帖子中,就像Youtube视频或BandPage歌曲嵌入到Facebook Feed墙中一样。现在点击图像,我们提供重定向到播放器,而不是内置加载播放器。



更新:我们要嵌入我们的SWF播放器,如BandPage。我们希望在我们的图像上放置一些小的按钮。我们也希望将小的符号留给日期。





点击图片或播放按钮,然后加载SWF。



< img src =https://i.stack.imgur.com/A4veD.pngalt =alt text>



如何通过Facebook实现这一点JavaScript API?这真的只是白名单吗?还是要提供更多的参数?



这是我现在所在:

  function fb_post()
{
var message ='看看我的梦幻SWF!
var picture ='链接到100X100图像';
var link ='链接到我们的SWF';
var source ='链接到我们的SWF';
var name ='Blah blah';
var caption ='Yada yada yada';
var description ='Facebook编程';
var type ='swf';

FB.api('/ me / feed','post',{message:message,picture:picture,link:link,name:name,type:type},function(response)
如果(!response || response.error){
alert('错误发生:'+ response.error.message);
} else {
alert(' :'+ response);
}
});
}

更新:现在正在工作!我们的图像上有播放按钮,SWF被加载并显示在Facebook墙上:)我们还没有使用FB.api。我们正在使用FB.ui。



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

解决方案

您需要将您的域名列为白名单。
以下形式为: http://www.facebook.com/ help / contact.php?show_form = video_embed_whitelist



更新:
您是否查看了这个?这似乎涵盖了你的需求(人,你必须讨厌FB来放置所有这些API和半数文档)



这可能是有趣的:

 < meta property =og:videocontent =http://www.example.com/player.swf?video_id= 123456789\" /> 
< meta name =video_heightcontent =200/>
< meta name =video_widthcontent =300/>
< meta name =video_typecontent =application / x-shockwave-flash/>

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



同时阅读 OpenGraph 文档 - 有很多关于如何使您的网站对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.

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.

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

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);
        }
    });
}

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.

解决方案

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

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)

This might be interesting:

<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.

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

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

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