这是我们在上周一遇到的一些Facebook API的问题。我们使用FBML(Facebook markup language)向facebook好友发送邀请(从我们的应用程序登录facebook没有问题)。它正处于被Facebook弃用的阶段。2012年1月1日:平台将不再支持FBML。2012年6月1日: FBML应用程序将不再工作。所有FBML端点都将被删除。你可以在这里找到更多:
developers.facebook.com/docs/reference/fbml/
function renderInviteFriends(contDiv) {
var htmlfb = "<span class='frnd-heading'>Facebook friends who are not yet using fipeo</span> <br /><br />";
htmlfb += "<fb:serverFbml width=\"" + width_of_invitation_div + "\"><script type=\"text/fbml\"><fb:fbml><fb:request-form action=" + window.location + " method='REQUEST' invite=true type='" + type_of_fb_request_form + "' ";
htmlfb += " content='<fb:req-choice url=\"" + baseUrl + "\" label=\"Accept\" />" + content_of_fb_request_form + "'>";
if (exclude_ids.length > 0)
htmlfb += " <fb:multi-friend-selector cols=" + column_count_fb_multi_friend_selector + " exclude_ids=\"" + exclude_ids + "\" actiontext=\"" + actiontext_fb_multi_friend_selector + "\"/>";
else
htmlfb += " <fb:multi-friend-selector cols=" + column_count_fb_multi_friend_selector + " actiontext=\"" + actiontext_fb_multi_friend_selector + "\"/>";
htmlfb += " </fb:request-form></fb:fbml></script></fb:serverFbml>";
document.getElementById(contDiv).innerHTML = htmlfb;
FB.XFBML.parse(document.getElementById(contDiv));
}现在FBML的替代方案是FBJS。如果有人已经在这些变化上做了研发,并克服了这个问题,请与我们分享。请记住我们使用的是facebook API的Javascript SDK。
发布于 2012-01-05 20:12:08
您应该结合使用Requests Dialog和FB.ui来邀请使用JavaScript SDK的用户
顺便说一句,和FBML一样,FBJS也将被弃用
https://stackoverflow.com/questions/8742217
复制相似问题