htmladdthis

Addthis : Different url's for image and on image link click


I am trying to use Addthis widget for my website.Right now I am using the following code to share image to different website.

<script>var addthis_config = {     
services_overlay:'facebook,twitter,email,more'
}</script>
<div class='giveTopMargin'>
   <a href='link' class='lightbox'  title='title'>
      <img class='addthis_shareable' src='img_url' addthis:url='img_url' addthis:title='message' />
   </a>
</div>

What I want is that when the user clicks the share button for facebook.I need the image preview of the img_url I've mentioned and when this link is successfully shared on facebook I need whoever clicks on this post on facebook, he should be redirected to the main page of my website instead redirecting him to the img_url.

Right now the problem with this code is that it shows me the following share box. enter image description here

As you can see it is showing me the img_url in the title and description instead of the things I've mentioned above that is the title message.If I change the img_url to the main page of my site then this will not show me the preview of the image I've shared.

I hope I am clear enough. Please let me know for any clearification.

Code Source : http://www.addthis.com/labs/photo-sharing#.USyj-jAyZjY


Solution

  • I was not able to solve the problem so I sent an email to the Addthis support and they said that facebook tries to catch the image preview from the url we mention.So I was not able to accomplish this using the Addthis Plugin.

    So I end Up doing it myself by using the facebook.ui dialog to share with the settings I wanted.