好的,我做了一个代码,它显示发生错误。请稍后在弹出窗口出现时尝试,并在 colsole 中显示:undefined at "function callback(response) { console.log(response); }"
这是代码:
<script>
function postToFeed() {
// call the API
var obj = {
method: 'feed',
link: 'https://apps.facebook.com/assault_combat/takegift',
picture: 'https://flyandsmash.herokuapp.com/images/Gift.png',
name: 'Take a gift from Assault Combat',
caption: 'https://apps.facebook.com/assault_combat/',
actions: [
{'name': 'Get Gift', 'link': 'https://apps.facebook.com/assault_combat/takegift'}
],
description: 'Action links are awesome.'
};
function callback(response) {
console.log(response);
}
FB.ui(obj, callback);
}
</script>
顺便说一句,当我输入“FB.init 和其他东西时,它也说错误......(我已经导入了 div fb 根和东西)