通过 Javascript SDK 渲染 Facebook 好友的 FBML 替代方案
以下是我们从上周一开始面临的 Facebook API 的一些问题。 我们使用 FBML(Facebook 标记语言)向 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。 如果有人已经对这些变化进行了研发并克服了这个问题,请与我们分享。请记住,我们使用 Javascript SDK 来实现 facebook API。
Here is some trouble with Facebook API we are facing from last monday.
We use FBML(Facebook markup language) for sending invitation to facebook friends(There is no problem in login to facebook from our app.) which is in phase of deprecation by Facebook.
On Jan 1, 2012: FBML will no longer be supported on Platform. June 1, 2012: FBML apps will no longer work. All FBML endpoints are removed. You can find more here:
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));
}
Now the alternative of FBML is FBJS.
If someone already done R&D on these changes and overcome from this problem please share with us. Please remember we use Javascript SDK for facebook API.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该将
请求对话框
与FB.ui
邀请用户使用 JavaScript SDK顺便说一句,FBJS 将与 FBML 同时弃用
You should use
Requests Dialog
withFB.ui
to invite users with JavaScript SDKBTW, FBJS will be deprecated same time as FBML