Re: Facebook open graphic tag
Prayag Verma <[email protected]>
| Newsgroups | gmane.comp.web.blogger.api |
|---|---|
| Message-ID | <[email protected]> |
Hi Bouy
A Similar question was raised sometime back here
https://groups.google.com/d/msg/bloggerdev/kOrBKimC-nc/WaU6ROnpK3EJ
Changing the code as per your needs , it would be something like
<script type="text/javascript">
//<![CDATA[
function bp_thumbnail_resize(image_url)
{
var image_size=1600;
var show_default_thumbnail=true;
var
default_thumbnail="http://2.bp.blogspot.com/-erTXCq61ULM/TmHYAQBZ0GI/AAAAAAAACCs/6cBX54Dn6Gs/s1600/default.png";
if(show_default_thumbnail == true && image_url == "") image_url=
default_thumbnail;
image_tag='<meta
content="'+image_url.replace('/s72-c/','/s'+image_size+'-c/')+'"
property="og:image" />';
if(image_url!="") return document.write(image_tag); else return "";
}
//]]>
</script>
<script>bp_thumbnail_resize("<data:blog.postImageThumbnailUrl/>");</script>
But there is some problem with this , even though it is added just below
the *<head>* tag , which would make certain that it is inserted first thing
in the DOM , It can't pass the Facebook Open Graph Debugger
( https://developers.facebook.com/tools/debug/ ). Maybe because it is
doesn't detect JavaScript , which is common with parsers
If you check via the Chrome DevTools or Firebug in Mozilla , you will see
that the Meta tag is successfully inserted into the DOM ( For example refer
this Test URL
http://tesbloggertemplates.blogspot.com/2013/10/honey-bees-and-sunflowers.html )
Can't do much until Blogger adds support for larger Post thumbnails from
the backend
On Sunday, October 20, 2013 11:23:50 AM UTC+5:30, Bouy Bourany wrote:
>
> <meta expr:content='data:blog.pageName' property='og:title'/>
> <meta expr:content='data:blog.title' property='og:site_name'/>
> <meta expr:content='data:blog.canonicalUrl' property='og:url'/>
> <b:if cond='data:blog.metaDescription'>
> <meta expr:content='data:blog.metaDescription' property='og:description'/>
> </b:if>
> <b:if cond='data:blog.pageType == "item"'>
> <meta content='article' property='og:type'/>
> <b:if cond='data:blog.postImageThumbnailUrl'>
> <meta expr:content='data:blog.postImageThumbnailUrl' property='og:image'/>
> </b:if>
> <b:else/>
> <meta content='blog' property='og:type'/>
> <meta content='*http://4.bp.blogspot.com/-qmTMlpKuSyo/Ul-qoeMgTLI/AAAAAAAAEIE/3Np3myyuRhg/s1600/1376444_257519191063553_1283162022_n.jpg*' property='og:image'/>
> </b:if>
>
>
> But it shows my image only a small size 72x72 . and i want to ask all of you how to get better size .
>
>
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/bloggerdev.
For more options, visit https://groups.google.com/groups/opt_out.