Creating custom social share buttons
At the top of this post, you’ll be able to see the Twitter, Facebook, Google Plus and LinkedIn share buttons I’ve made for the blog. All of them work the same way, and that’s by opening a popup window that allow you to sign in and share the current page you’re on to the appropriate network. I spent some time trying to get this to work in an
iframe in a fancypants modal dialog, but I had no luck with that due to security constraints. Each of the four networks has a url to point to that’ll let you prepopulate a share widget with the url of the current page. I wasn’t able to find a repository of these urls online, so here it is.