我需要能够在Facebook上将音频文件共享到我的墙上和朋友的墙上。另外,当我点击用户个人资料上的共享项目图像时,我也必须播放音频。我怎样才能在Facebook个人资料中共享和播放音频MP3文件/
我已经尝试使用下面的函数来分享,但我不知道我怎样才能改变形象..
function fb_share() {
var linkVideo = "http://www.youtube.com/watch?v=nXefLc5VXsGY";
u=linkVideo;
t=document.title;
window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
}
我也曾尝试API代码
FB.init({
appId : 'appid', // application Id
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
function publishStream(targetId, name, link, picture, source, userName,message) {
FB.ui(
{
method: 'feed',
name: name,
link: link,
picture: picture,
source: source, // The URL of a media file (e.g., a SWF or video file) attached to this post
caption: 'Shared by '+userName,
actions: {name: 'Try App', link: link},
message: message
},
function(response){
if (response && response.post_id) {
} else {
}
});
}
,但我不能选择我的朋友并张贴到他们的墙上。总之,使用这个API,我需要得到像第一个共享者那样的对话框。
如何在用户配置文件中播放我的音频文件?
嗯,你与闪光和恼人的音乐和独角兽思维的MySpace。 Facebook不会让你在你的页面或其他人的页面上注入随机垃圾。这是Facebook击败MySpace的主要原因 - 它看起来不像一个8岁女孩的大脑在互联网上呕吐。 – evan