0

我應該使用哪些API在FB上共享帖子。 我已經使用這個FB post的API

var o = { 
    "og:title" : "Test " + new Date(), 
    "og:url" : "http://www.123.com/work", 
    "og:image": "http://www.clipartlord.com/wp-content/uploads/2014/06/train20.png", 
    "og:description" : "This is the best train ever - Toy Train" 
} 


FB.ui({ 
    method: 'share_open_graph', 
    action_type: 'Share', 
    object_type: 'Announcement', 
    action_properties: JSON.stringify({ 
     object:o, 
    }) 
    }, function(response){ 
    }); 

這股直接在牆壁上的內容,帶給用戶沒有選擇的選擇(朋友,牆壁,管理頁面等)嘗試。我必須使用什麼api來展示這個視圖?

enter image description here

回答

0

那的Share Dialog

舊版本產品的當前版本被初始化像這樣:

FB.ui({ 
    method: 'share', 
    href: 'https://developers.facebook.com/docs/', 
}, function(response){}); 

或者你也可以手動鏈接到對話框,並把它在一個彈出(如截圖所示)