发布新闻使用JavaScript SDK读取活动

时间:2012-10-28 06:58:15

标签: javascript facebook facebook-graph-api

我正在使用JavaScript SDK向Facebook发布活动,但我得到的响应为“未定义”

<script>

setTimeout(function(){ 
    FB.api(
    '/me/news.reads' , 
    { article : document.location.href }, 
    function(response) {
        alert(response.name);
    });  
},10000);  

</script>

我应该怎样做才能纠正这个问题?

1 个答案:

答案 0 :(得分:-2)

运行以下内容并检查回复

<script>

setTimeout(function(){ 
    FB.api(
    '/me/news.reads' , 
    { article : document.location.href }, 
    function(response) {
        console.log(response);
    });  
},10000);  

</script>