Facebook Like Meta Tags not showing Images
Posted
by
Hooman Ahmadi
on Stack Overflow
See other posts from Stack Overflow
or by Hooman Ahmadi
Published on 2011-01-01T21:49:08Z
Indexed on
2011/01/01
21:54 UTC
Read the original article
Hit count: 285
I have implemented the Facebook Like button on all our pages and it works properly by posting to Facebook with the correct meta tags. However, the images do not show in Facebook. The image meta tags show up properly when I use the Facebook Linter, but they don't show on someone's facebook page where the Like is posted on their wall. Also, is there any way to have the info recache more often? The tags take forever to update. Our site is built with CakePHP. Below are snippets of my code, thanks:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script type="text/javascript" src="http://use.typekit.com/wlx8xgm.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<?php
if(!isset($meta_title)) {
$meta_title = $title_for_layout;
}
if(!isset($meta_location)) {
$meta_location = null;
}
if(!isset($meta_image)) {
$meta_image = null;
}
if(!isset($meta_type)) {
$meta_type = null;
}
?>
<meta property="og:title" content="<?= $meta_title ?>"/>
<meta property="og:type" content="<?= $meta_type ?>"/>
<meta property="og:url" content="<?= $meta_location ?>"/>
<meta property="og:image" content="<?= $meta_image ?>"/>
<meta property="fb:admins" content="1004432800"/>
...
echo '<br><br><fb:like href="' . $fbook_url . '" width="300" height="80" layout="standard" show_faces="true" colorscheme="light"></fb:like>';
© Stack Overflow or respective owner