That's great Jesse that you've found a method that works. I didn't
know that was a way to force a reload of widget.js.

Note that widget.js only needs to be re-sourced once to render all
Tweet buttons on the page, so you can just render plain tweet links
and then re-source the script.

An alternative method I've found successful is to take a local copy of
widget.js and give its main function a name:

  var twttr=window.twttr||{};(twttr.showWidgets = function()...

(Note that the parenthesis and the end has to be moved before the
"()").

The AJAX response can the just include a "twttr.showWidgets()" call.

Twitter should really alter widget.js to do something similar, just
like the Facebook sharer allows you to call "FB.Share.renderPass()".

Another alternative that should work, but doesn't, probably because of
a Twitter bug, is to render the button directly as an iframe, as
described at http://dev.twitter.com/pages/tweet_button . AJAX updates
then work fine, except for a JavaScript error about a missing
twttr.updateTweetCount function. Is this a bug in
http://platform.twitter.com/widgets/tweet_button.html ?

Mark

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to