如果您使用的是IFrame应用程序,则可以使用JS API中的FB.UI.PopupDialog.坏消息是此功能没有文档,并且使用起来不是很容易.好消息是我已经弄明白了!:)
// First, define the HTML content you want in the dialog as a javascript string:
var content = '<div><h2>Help is here!</h2><div>Hint: you can eat the cookies!</div></div>';
// Then add the content to this resource dictionary thing, wrapped in a div with the id "RES_ID[your identifier here]"
FB.UI.DomResources.addResourceDict(new FB.UI.DomResDict('<div id="RES_IDhelp01">' + content + '</div>'));
// Instantiate the popup dialog and show it:
var popup = new FB.UI.PopupDialog('Help?!', FB.UI.DomResources.getResourceById('help01'), false, false);
popup.show();
Run Code Online (Sandbox Code Playgroud)
当然,这些位可以根据需要通过您的页面展开,您可以使用php为您生成html内容.
容易,对吗?:D享受!
| 归档时间: |
|
| 查看次数: |
3092 次 |
| 最近记录: |