开发者

Adding a custom image to facebook like feature

开发者 https://www.devze.com 2023-02-15 05:24 出处:网络
This may seem like a duplicate question or it is easily answered here yet I remain utterly befuddled by how easy of a feature this is to implement and how much trouble I am having adding my image and

This may seem like a duplicate question or it is easily answered here yet I remain utterly befuddled by how easy of a feature this is to implement and how much trouble I am having adding my image and finding a solution that开发者_如何学Go works. I have been scouring to no avail. The two links provided above show the only two options I have found which are:

<meta property="og:image" content="http://www.example.com/styles/images/fb_cl_logo.png"/>

and

<link rel="canonical" href="http://www.example.com/Blogs_fb_build.php?id=<?php echo $blog; ?>"/>

Needless to say this is not working whatsoever!

Thanks in advance.


Here are two probable reasons:

  1. The url to the image is invalid or the URL is inaccessible by Facebooks crawler.
  2. Facebook have cached the thumbnail for your page.

If Facebook have cached the results your page, use the Facebook Debugger and enter the URL to your page, it will usually break the cache (can be good to add cache break querystring if it misbehaves).

If it isnt a cache problem you will see what information the crawler sees about your page which probably is going to solve your problem.

Another things worth mentioning is that breaking the cache in the debugger doesnt always reflect to the "normal Facebook posting" instantly.


Because you didn't link to the image it's hard to be sure, but is your image within the 3:1 aspect ratio which Facebook supports? Many people aren't aware of that restriction. If the image is too wide/tall the Facebook's Debug Tool will still detect it but it won't be rendered in news feed

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号