WP7 / Silverlight Social Networking Buttons

 A couple of people have asked about the social networking buttons that appear on most of my WP7 apps allowing you to share a link via Twitter / Facebook etc. 

image As is often the case I spent some time pursuing my own efforts before I stumbled upon a rather easy / nifty / flexible solution involving the API available at http://api.addthis.com.

Essentially this rest based API provides a consistent way to call each Social network, so it is simply a case of creating a HyperlinkButton for each of the providers you wish to support (Its not difficult to consolidate this into a single method that is called by all the buttons, provided you give each button a name that reflects the provider you wish to call). 

So each hyperlink button has a click event that calls a method something like:

image

Notice that the click event code fires before the navigation is fired – very handy!

You can see this in action when you send or share a Puzzlegram: http://apps.webservicesuk.com/Puzzlegram or Nuke your own office : http://apps.webservicesuk.com/NukeYourOffice

Advertisements

~ by Ian on June 23, 2010.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: