How do I get Facebook Like Button to clear my page again?

I created a similar button on the page (http://www.usna.edu/BillAF/game.php) that sends the URL / data for this parent page. Unfortunately, when I first put it in, the older version of the page was in the place of the parent page, on which there were no open meta-diagrams.

So, when someone β€œloves” the page, he sends the wrong header and image of the β€œgarbage” half of the letter β€œe” on white and gray squares.

I checked: http://developers.facebook.com/tools/debug and it has updated information. I also tried changing the associated AP ID to a new one, and none of them updated what it sends when I β€œlike”. I also tried adding index.php to the end of the URL that should be hosted (http://www.usna.edu/BillAF), but to no avail.

Is there anything I can do to get it to clear the page again? If not, does anyone know how long it will take for facebook to re-clean it on its own?

+4
source share
2 answers

A good way to clear your cached image and text on facebook is by running the Debugger tool:

http://developers.facebook.com/tools/debug

By placing the URL you are currently using, it will update the facebook cache from your site.

+3
source

Facebook has an API for re-clearing page data, I use the following function:

function purgeFacebookCache($url, $debug=false) { // Set the variables for Facebook $fields = array( 'id' => urlencode($url), 'scrape' => true ); foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } rtrim($fields_string,'&'); // Connect $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,'https://graph.facebook.com'); curl_setopt($ch,CURLOPT_POST,count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); $result = curl_exec($ch); // Debug if ($debug) { var_dump($result); } } 
0
source

Source: https://habr.com/ru/post/1438082/


All Articles