문제

I would like to know when a user leaves a comment or likes a page, so I used

FB.Event.subscribe('comments.add', function(response) {
    alert('comment add');       
}); 
FB.Event.subscribe('comment.remove', function(response) {
    alert('comment remove');
});
FB.Event.subscribe('edge.create', function(response) {
    alert('like add');
});
FB.Event.subscribe('edge.remove', function(response) {
    alert('like remove');
});

Only 'comments.add' is working which is different from the facebook doc, so I guess there are another names for the other events? The like button doesn't work at all it gives the following error

Website inaccessible The page at http://localhost.local/interviews/view/2 could not be reached.

I am using:

<fb:comments numposts="5" notify="true" width="450" height="500" class="fb_iframe_widget">/fb:comments>

as it is shown in the url, I am working on localhost environment, is this the problem?

도움이 되었습니까?

해결책

Yep, if Facebook's crawler can't reach your page, it can't be liked. I'm not sure the comments plugin has that level of verification so I think the comments plugin may still work

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top