Recently got my Twitter cards approved but it seems the image is not showing. My blog (blog.chucksanimeshrine.com) is Blogger powered so the meta tags for twitter cards have to be coded as such:
<meta content='summary_large_image' name='twitter:card'/>
<meta content='@canimeshrine' name='twitter:site'/>
<meta content='@princetrunks' name='twitter:creator'/>
<meta expr:content='data:blog.homepageUrl' name='twitter:domain'/>
<b:if cond='data:blog.pageType == "item"'>
<meta expr:content='data:blog.url' name='twitter:url'/>
<meta expr:content='data:blog.pageName' name='twitter:title'/>
<b:else/>
<meta expr:content='data:blog.homepageUrl' name='twitter:url'/>
<meta expr:content='data:blog.title' name='twitter:title'/>
</b:if>
<meta expr:content='data:blog.metaDescription' name='twitter:description'/>
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageThumbnailUrl' name='twitter:image'/>
<b:else/>
<meta content='http://www.chucksanimeshrine.com/images/cas_icon_open_graph.jpg' name='twitter:image'/>
</b:if>
Seems that the image being pulled from data:blog.postImageThumbnailUrl in the validater is coming up very small (72x72px) thus probably why the summary_large_image card won’t render it since the minimum is over 260px wide.
One way I thought I could fix this is to find maybe a better Blogger “b: data:” namespace variable catered to pulling higher rez images from the posts (since the post images are well in the requirement for summary_large_image)…but it seems I can’t find such a variable in Blogger’s library.
Also, seems that data:blog.postImageThumbnailUrl is valid nonetheless as this is used in my Open Graph meta tags with Facebook / Google+ not having an issue; the image they pull from data:blog.postImageThumbnailUrl appear to be the right size…at the very least, much bigger than 72x72.
Is this an issue with the API? Seems others are asking the question too in some of the blogger threads with no response. just want to get the image working when my blog posts are shared. All of the other aspects of the Twitter Card are working though…just would like the image to show.
tl;dr: summary_large_image’s twitter:image not showing when using a Blogger powered blog.
Thank you in advance for any help on this
EDIT-SOLUTION**
OK, found a solution, actually it was thanks to code linked by @rchoi in another post… https://dev.twitter.com/docs/cards/twitter-cards-for-cms-wordpress-blogger-tumblr
The key is for anyone with a blogger blog to get this working is to use the code like this and AFTER the line:
<b:includable id=‘post’ var=‘post’>
Here’s the code I pasted after the above line and now it seems the validator is working like a charm
<!--TWITTER CARD CODE-->
<meta name='twitter:site' content='@canimeshrine'/>
<meta content='@princetrunks' name='twitter:creator'/>
<meta expr:content='data:blog.homepageUrl' name='twitter:domain'/>
<meta expr:content='data:blog.pageName' name='twitter:title'/>
<b:if cond='data:post.firstImageUrl'>
<meta name='twitter:card' content='summary_large_image'/>
<meta name='twitter:image' expr:content='data:post.firstImageUrl'/>
<b:else/>
<meta name='twitter:card' content='summary'/>
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta name='twitter:image' expr:content='data:blog.postImageThumbnailUrl'/>
</b:if>
</b:if>
<meta name='twitter:title' expr:content='data:blog.pageName'/>
<b:if cond='data:blog.pageType == "item"'>
<meta name='twitter:description' expr:content='data:post.snippet'/>
<b:else/>
<meta content='http://www.chucksanimeshrine.com/images/cas_icon_open_graph.jpg' name='twitter:image:src'/>
<meta expr:content='data:blog.title' name='twitter:title'/>
<b:if cond='data:blog.metaDescription'>
<meta expr:content='data:blog.metaDescription' name='twitter:description'/>
</b:if>
</b:if>
<!--TWITTER CARD CODE END-->
Granted, there’s probably some spaghetti code and if-else statements that can be truncated as well as simply letting my Open Graph fields handle some other twitter fields too since it also seems that twitter: tags are not yet logged into w3C’s database while Open Graph tags are.
Thank you for that link @rchoi and hope this helps people get twitter cards working for the very tough to code with Blogger template code.