I initialize the tweet button at the beginning of my app, after user interaction the current window\'s location is updated using HTML5 pushState, but the twitter button is still
I had success using the new Twitter feature that reloads the share url.
function updateTwitterValues(share_url, title) {
// clear out the tag that's currently there...probably don't really need this since you're replacing whatever is in there already.
$(container_div_name).html(' ');
$(container_div_name).html('Tweet');
twttr.widgets.load();
}
My initial HTML just has a container for the share link, like this:
Any time I get new data from an ajax call I just call updateTwitterValues() and pass along the new info. More info here https://dev.twitter.com/discussions/5642