简体   繁体   English

FB.ui 抛出错误

[英]FB.ui throwing error

FB.ui({
        method: 'apprequests',
        title: 'Swag with the Swedes',
    message: 'Win 2 tickets to Swedish House Mafia'
}, requestCallback);

I have the code above which throws Uncaught TypeError: Cannot call method 'postMessage' of null我有上面的代码抛出 Uncaught TypeError: Cannot call method 'postMessage' of null

I've searched everywhere for this but no solution.我到处寻找这个,但没有解决方案。 Anyone has any idea of what's wrong?任何人都知道出了什么问题?

Thanks谢谢

I found the issue.我发现了这个问题。

The following div had to be in the body:以下 div 必须在正文中:

<div id="fb-root"></div>

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

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