我已经编写了一个代码,用于通过Graph API从Facebook页面获取帖子ID。并且页面共享或喜欢的帖子会显示为无效帖子
function fbfeeds(data) {
var entries = data.data || [];
var html = ['<div class="fbfeed">'];
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
var pid = entry.id;
var postid = pid.split("_");
html.push('<div class="fb-post" data-href="https://www.facebook.com/permalink.php?story_fbid=' + postid[1] + '&id=' + postid[0] + '" data-width="750"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/permalink.php?story_fbid=' + postid[0] + '&id=' + postid[0] + '">Innlegg</a> av <a href="https://www.facebook.com/pages/{page_name]/{page_id}">page_id</a>.</div></div>');
html.push('<br>');
}
html.push('</div>');
document.getElementById('fbfeed').innerHTML = html.join('');
}
如何在帖子中显示喜欢和分享? 无论作者是否有嵌入帖子的通用代码?