我需要能夠在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