我正在使用JavaScript SDK向Facebook发布活动,但我得到的响应为“未定义”
<script>
setTimeout(function(){
FB.api(
'/me/news.reads' ,
{ article : document.location.href },
function(response) {
alert(response.name);
});
},10000);
</script>
我应该怎样做才能纠正这个问题?
答案 0 :(得分:-2)
运行以下内容并检查回复
<script>
setTimeout(function(){
FB.api(
'/me/news.reads' ,
{ article : document.location.href },
function(response) {
console.log(response);
});
},10000);
</script>