I've added facebook like button, but it works only once on the page. The page consists of "tiles" and every tile has own link and user should be able to "like" any tile on the page. The code of the called function is the following:
FB.Event.subscribe('edge.create', handleResponse(response));
var handleResponse = function(response) {
var query = FB.Data.query('SELECT like_count FROM link_stat WHERE url="some_url_goes_here"');
query.wait(function(rows) {
alert('number of likes ' + rows[0].like_count);
// ... other code
});
};
When user presses some button - appears Facebook "like" button (e.i. called function startFacebook(), the content of which is given above) together with like buttons of some other social networks.
Some time ago the contents of this function started with:
FB.Event.clear('edge.create');
but this is deprecated now and Facebook says that is should not be used any more and sends response like this:
c jssdk_error
m {"error":"Private method used","extra":{"args":"Event.clear"},"appId":"246731078776510"}
When I used FB.Event.clear - everything worked fine. Does anyone knows how to substitute this lacking funciton?
Thanks for help!