I think your parent post was talking about the Facebook Like/Google+ +1 buttons. In order for those to work, I believe they need to be loaded on the page via an iframe.
Things like Facebook's "share" and Twitter's "tweet" buttons don't execute any arbitrary (i.e. not specified by the developer) JavaScript.