FBML multi friend selector in fb:dialog
Is th开发者_StackOverflow中文版ere a way to show the multi friend selector widget (fb:multi-friend-selector) in an fb:dialog?
I have a button, on selecting which I would like to show the friend selector popup and users can send invite to their friends. I got the friend selector working on the main page but have no clue on how to display that widget in fb:dialog.
Thanks Jugs
You'll have to edit this, but here's a jist:
popupInviteFriends : function (e) { if (e) { e.preventDefault(); }
var fbml = '<fb:request-form \
action="." \
method="GET" \
invite="true" \
type="TWO" \
content="This is an invitation from ' + TWOFace.BRAND + '. \
<fb:req-choice url=\'' + TWOFace.INVITE_DIALOG.postBack + '\' \
label=\'Join ' + TWOFace.BRAND + '\' />"> \
<fb:multi-friend-selector \
showborder="false" \
rows="4" \
actiontext="Invite your friends to use ' + TWOFace.BRAND + '"> \
</fb:multi-friend-selector> \
</fb:request-form';
var container = document.createElement('div');
container.innerHTML = fbml;
var inviteIFrame = new FB.UI.PopupDialog(TWOFace.INVITE_DIALOG.title, container);
inviteIFrame.setContentWidth(590);
inviteIFrame.setContentHeight(400);
inviteIFrame.show();
},
精彩评论