Dynamically changing URL and updating counters

jon Jun 04, 2012 05:20AM EDT

Hi,

I'm developing a new version of an existing video site, and am implementing sharing using AddThis. This site uses hashbang URLs (#!id=..., #!category=...). When a video is loaded by the user, the URL is changed, and I want the AddThis toolbox (completely standard code) to update to reflect the new URL. I have tried both setting addthis.ost = 0, calling addthis.update('share', 'url', ...) and then addthis.ready(), as well as just calling addthis.update and then addthis.toolbox(). Unfortunately, none of these seem to have any effect. The toolbox never updates.

I also cannot seem to find any directions on how to achieve this in the documentation?

Hope one of you can be of assistance,
Cheers,
Jon

Up -1 Rated Down
Paul (AddThis Happiness Specialist) Jun 04, 2012 11:45AM EDT
I'd love to help but first I'll need the URL of the page where you're seeing the problem.
Up 1 Rated Down
daniwan Nov 13, 2012 01:09AM EST
Paul,
Seems like you didn't even try to address the question. It is one that I and many other developers have asked in many different ways. Let me post a scenario and word the question to see if it becomes easier to understand.

First, we load an index page which contains the layout of a dynamic site. This html includes the generated code used from the "Get The Code" link here on the site.

Second, we dynamically refresh content somewhere on the page using ajax. Once the page has been updated and the new content is displayed we use...

addthis.update('share', 'url', 'new-url');

So far so good, the addthis tool bar we are using updates the internal URL that will be used while sharing. However all of the counts remain from the original loading of the index page. What we are asking is not how to dynamically render buttons so please don't reference that portion of the documentation. More so what we are looking for is a very simple answer... What function will update the counter's to display the correct counts for the newly set url? What one line of code do we call next to refresh the counts?

addthis.update('share', 'url', 'new-url');
addthis.update('counters'); <-- What will do this?

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Still need help?


General Topics

 

Developers