Problems, need help? Have a tip or advice? Post it here.
5 posts Page 1 of 1
Currently I am presenting Facebook with my blog image with the following code:
Code: Select all
<meta property="og:image" content="<cms:show blog_image />" />

My problem is that my blog image is a weird size [680x220] and Facebook doesn't seem to want to scrape it when I post my blog links in status updates. Is there a way to present Facebook with a separate image that is 100x100 and not viewable to the reader?
What you described is the purpose of the 'thumbnail' editable region (http://www.couchcms.com/docs/tags-reference/editable/thumbnail.html), place this within your 'template' tag:
Code: Select all
<cms:editable name='blog_image_fb' label='Facebook Thumbnail' width='100' height='100' crop='1' show_preview='1' assoc_field='blog_image' type='thumbnail' />

You could then use this editable region in the 'og:image' meta tag:
Code: Select all
<meta property="og:image" content="<cms:show blog_image_fb />" />
Thank you for the reply. I have updated my 'template' and went to debug with Facebook and this is the error that I am getting:

Object Invalid Value: Object at URL 'http://sharpenyouraxe.net/blog/business/the-key-to-hiring-a-good-attorney.html' of type 'article' is invalid because the given value '' for property 'og:image:url' could not be parsed as type 'url'.
My apologies, I should have anticipated this would happen. Because you added the 'thumbnail' editable region after your pages were already created, the 'thumbnail's will be blank. All new pages you create however will be fine.

To fix the old pages you will need to edit each of them:
Remove the image url from the 'blog_image' field.
Click Save.
Select that same image.
Click Save.

This should create the thumbnails.
That did the trick. I should have thought of that. thank you so much for your help!
5 posts Page 1 of 1
cron