Facebook Open Graph Image

I have the social plugin on a certain website, and every day the thumbnail images (Open Graph Image) are changed.

Every day I need to enter the URL: https://developers.facebook.com/tools/debug /

And enter my URL, and click "Fetch new Scrape Information".

{Facebook Facebook[0]}so that as soon as a user of the system wants to share the website on Facebook the image was updated so that Facebook updates The Open Graph Image.

How to automate this process?

Author: Maniero, 2014-10-20

1 answers

The solution was to put the following code snippet on the page:

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

As soon as a user enters the page, the image updates automatically.

Grateful.

 0
Author: Thiago Prado, 2014-10-21 12:03:06