Facebook Open Graph Image

Asked

Viewed 167 times

1

I have the social plugin on a particular 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 insert my URL, and click "Fetch new Scrape Information".

So that once a system user wants to share the website on Facebook the image was updated so that Facebook update the Open Graph Image.

How to automate this process?

  • In what language?

  • Random and unviable idea(?), would be cool if you could use a imagem.png.php

  • I should create this as a process so that it runs along with changing the image. And on the Immaculate, you would have to give the command for it to perform this routine...

  • Brasofilo, the random idea did not work, but it was worth! :)

1 answer

0


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 automatically updates.

Grateful.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.