我正在使用Facebook的Legacy REST API将MP3媒体附件发布到用户的流中(因为新的Graph API还不支持音频)。这会像预期的那样在Facebook自己的媒体播放器中呈现音频。但是,因为播放器是一个闪存组件,所以它不会在iOS设备上呈现,因此会提示进行闪存升级。我想提供一个备用网址,这样用户就可以通过HTML5音频播放器点击到外部网站。
有没有办法做到这一点?在attachment对象中提供href参数:
access_token = 1234567890.....,
format = 'json',
privacy = {
value: 'EVERYONE'
},
message = 'Message goes here...',
attachment = {
href: 'http://www.google.com',
media:[{
type:'mp3',
src:'http://www.looptvandfilm.com/blog/Radiohead - In Rainbows/01 - Radiohead - 15 Step.MP3',
title:'15 Step',
artist:'Radiohead',
album:'In Rainbows'
}]
}或者在post对象本身中:
access_token = 1234567890.....,
format = 'json',
privacy = {
value: 'EVERYONE'
},
message = 'Message goes here...',
href: 'http://www.google.com',
attachment = {
media:[{
type:'mp3',
src:'http://www.looptvandfilm.com/blog/Radiohead - In Rainbows/01 - Radiohead - 15 Step.MP3',
title:'15 Step',
artist:'Radiohead',
album:'In Rainbows'
}]
}似乎没有任何效果...
因此,我是否仅限于使用flash媒体类型,提供我自己的SWF和图像?
发布于 2011-06-29 23:11:23
您可以尝试使用post对象上的action_links数组属性为用户添加自定义链接。
action_links = [("text":"alternate site link text here","href":"alternate url here"}]发布于 2011-06-28 20:25:42
您可以尝试像YepNope这样的代码来测试iOS,然后根据测试结果加载不同的脚本。
yepnope({
test: '<test for iOS here>',
yep: '/scripts/scriptDefiningUrl.js',
nope: '/scripts/scriptDefiningFallbackUrl.js',
callback: function (url, result, key) {
alert('scripts loaded!');
}
});https://stackoverflow.com/questions/6329890
复制相似问题