简体   繁体   English

通过Javascript SDK渲染Facebook朋友的FBML替代

[英]Alternative of FBML for render facebook friends via Javascript SDK

Here is some trouble with Facebook API we are facing from last monday. 从上周一开始,Facebook API出现了一些问题。 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. 我们使用FBML(Facebook标记语言)向Facebook朋友发送邀请(从我们的应用登录Facebook没问题。),这是Facebook弃用阶段。 On Jan 1, 2012: FBML will no longer be supported on Platform. 2012年1月1日:平台将不再支持FBML。 June 1, 2012: FBML apps will no longer work. 2012年6月1日:FBML应用将不再起作用。 All FBML endpoints are removed. 所有FBML端点均已删除。 You can find more here: 您可以在此处找到更多信息:

developers.facebook.com/docs/reference/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));
}

Now the alternative of FBML is FBJS. 现在,FBML的替代方法是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. 请记住,我们将Javascript SDK用于Facebook API。

You should use Requests Dialog with FB.ui to invite users with JavaScript SDK 您应该在FB.ui使用“ Requests Dialog ,以使用JavaScript SDK邀请用户

BTW, FBJS will be deprecated same time as FBML 顺便说一句, FBJS将与FBML同时被弃用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM