Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook ignoring og:image for shared website link

I have recently noticed that facebook has started ignoring my og:image tag on my site. The image used is always larger than 200x200.

Here is an example page:

http://bit.ly/15CrOhS

http://bit.ly/1b8Mgbe

Seems to be alot of questions, but no answers. I've added all the og information and checked with the linter and it all goes through fine. So why does it choose to pick a random image?

I use the facebook api for PHP to send:

<?php

$link = 'http://www.mylinkaddress.com';
$msg = 'Check out my new photo. '.$link;

$get_oauth = "SELECT * FROM users_oauth_cred WHERE userid = ".$_SESSION['userid']." AND share = 1 AND oauth_access_token != ''";
$get_oauth = mysql_query_run($get_oauth);
$oauth = mysql_fetch_array($get_oauth);

# FACEBOOK
$facebook = new Facebook(array(
    'appId'  => FACEBOOKAPPID,
    'secret' => FACEBOOKSECRET,
    'cookie' => false,
));
$token = $oauth['oauth_access_token'];

try {
    $result = $facebook->api(
            '/me/feed/',
            'post',
            array('access_token' => $token, 'message' => str_replace($link,'',$msg), 'link' => $link)
    );

}
catch(FacebookApiException $e) {}

?>
like image 519
David Avatar asked Feb 16 '23 06:02

David


1 Answers

I had the same issue.

Go to Facebook Object Debugger, verify every issue pointed there, fix them all. This solved my problem.

http://goo.gl/ASBsAa

like image 182
Gilberto Soares Filho Avatar answered Feb 23 '23 05:02

Gilberto Soares Filho