[blog]
Hướng dẫn các bạn fix lỗi không hiển thị hình ảnh, thumb khi chia sẻ bài viết blogspot lên facebook, một số blog khi chia sẻ bài viết lên mạng xã hội không có hình thu nhỏ hoặc bị lỗi thì đây là cách giải quyết.

Hướng dẫn sửa lỗi hình ảnh chia sẻ bài viết lên facebook


Các bạn copy toàn bộ code bên dưới dán dưới thẻ <head> và lưu lại. Sau đó thẻ chia sẻ bài viết blog của bạn lên facebook để kiểm tra.

Hoặc có thể kiểm tra và thu nhập lại thông tin bằng Công cụ gỡ lỗi chia sẻ của facebook:

<b:if cond='data:view.featuredImage'>
    <meta expr:content='resizeImage(data:view.featuredImage, 1200, &quot;1200:630&quot;)' property='og:image'/>
<b:elseif cond='data:widgets'/>
    <b:loop reverse='true' values='data:widgets.Blog.first.posts where (p =&gt; p.featuredImage) map (p =&gt; p.featuredImage)' var='imageUrl'>
    <meta expr:content='resizeImage(data:imageUrl, 1200, &quot;1200:630&quot;)' property='og:image'/>
    </b:loop>
<b:elseif cond='data:blog.postImageUrl'/>
    <meta expr:content='resizeImage(data:blog.postImageUrl, 1200, &quot;1200:630&quot;)' property='og:image'/>
</b:if>

Chúc bạn thành công!
[/blog]