3
votes

I'm using custom AddThis buttons to share things in Twitter and Facebook... for Twitter share I use:

addthis:templates="{ twitter: ' {{title}} @ {{url}} via @agenciauzzye' }"

I know that for the Facebook custom description, title, url, image and other things I must have to use meta tags. The problem is that I have a blog with one static page and all the content (posts) are loaded inside one div with AJAX. The main page is a posts list where I have the buttons to share each post...

How do you guys share content in Facebook with AddThis without set up the meta tags???

The only solution I found is to use direct Facebook share URL, without pass by AddThis code (and so, without log for analysis). Something like:

<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[summary]=<?php echo rawurlencode(striptags(abrev_texto(get_output($descricao),1000,"p"," ...",true)));?>&amp;p[title]=<?php echo rawurlencode(get_output($post->titulo));?>&amp;p[url]=<?php echo rawurlencode(ROOT_SERVER . ROOT . "blog/" . $urlAux); ?>&amp;&amp;p[images][0]=<?php echo rawurlencode($imageShare);?>','sharer','toolbar=0,status=0,width=548,height=325');" href="javascript: void(0)"></a>

You can see more details in http://blog.uzzye.com

1

1 Answers

0
votes

Luckily the Facebook developers were smart enough to realize they cannot predict every type of web page on the internet. Instead, they offer a few simple meta tags that control how this information is passed to Facebook:

title: <meta name=”title” content=”The title of the link being shared” />

short description: <meta name=”description” content=”A description of the page” />

optional thumbnail image: <link rel=”image_src” href=”http://example.com/images/image.jpg” />

That’s all you need to tell Facebook what to populate in the link details when someone shares your page with others on Facebook.