Search code examples
facebookfacebook-graph-apifacebook-like

Clear scrape information for all urls of a particular domain in Open Graph Object Debugger


The problem started with the total like/share count FindYogi Micromax Product page . Instead of showing the product page count, it actually showed the count of FindYogi Homepage.

My theory is that, long ago the product page url pointed to the home page, and thus it cached the count, hence showed incorrect data.(Note it has been fixed)

After fetching new scrape information from Facebook Open Graph Debugger for the affected urls, the like/share count got corrected for the same.

Problem Statement: I have hundreds of urls thats needs correction, so is there a way I can fetch latest scrape information using the debugger for all the urls in some autonomous way, instead of manually locating and updating them one by one.


Solution

  • You can automate it, here´s how it works with jQuery as example:

    $.post('https://graph.facebook.com', {
        id: 'http://yourdomain.com/yoururl',
        scrape: true
    }, function(response) {
        console.log(response);
    });
    

    Just do a POST request to the Graph API with "id" and "scrape" as parameters. Of course you could also do that server side.