Question

I am trying to use AddThis for sharing on my website. I have set-up general sharing toolbox in top of my page and I want to use this toolbox to share some general title and description about my page. Besides that, for each slide, I want to set-up specific share buttons for twitter and facebook. These are now added as links below text. However when I click on this they don't generate title and description as I specified in URLs:

<a href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=http://ba-timeline.appspot.com/#4&title=Hellothere&description=Opis" rel="nofollow" target="_blank">FB</a> 

<a href="http://api.addthis.com/oexchange/0.8/forward/twitter/offer?url=http://ba-timeline.appspot.com/#4&title=Hellothere&description=Opis" rel="nofollow" target="_blank">TW</a> 

Am I doing something wrong here?

Was it helpful?

Solution

Facebook doesn't work like the other AddThis buttons. Instead of accepting parameters that we pass it, Facebook requests the URL you're sharing and gets the data it displays from the meta and link tags in the header. To control how your page is shared on Facebook you should use OpenGraph tags which are described in Facebook's documentation here: http://developers.facebook.com/docs/opengraph/

You also need to change the # symbol in the URL parameter to %23 or our server will think that it's an anchor appended to the /offer URL rather than appspot URL. Try this instead:

<a href="http://api.addthis.com/oexchange/0.8/forward/facebook/offer?url=http://ba-timeline.appspot.com/%234&title=Hellothere&description=Opis" rel="nofollow" target="_blank">FB</a> 

<a href="http://api.addthis.com/oexchange/0.8/forward/twitter/offer?url=http://ba-timeline.appspot.com/%234&title=Hellothere&description=Opis" rel="nofollow" target="_blank">TW</a> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top