Over a million developers have joined DZone.

Super-Easy Access to Social Data via ASP.NET MVC


I found small library called SocialCounter.NET that is able to display some data from popular social sites. Although it is possible to use widgets offered by social networks there are also scenarios when you don’t want or can’t use these JavaScript based widgets. In this posting I will show you how to use SocialCounter.NET.

Start with downloading SocialCounter.NET. You can also use NuGet package manager to download SocialCounter.NET.

Using SocialCounter.NET is very easy as you can see from this example view:

@using SocialCounter.NET;

     ViewBag.Title = "Home Page";

    Twitter followers: @Counter.GetTwitterFollowersCount("gpeipman")<br />
    Facebook friends: @Counter.GetFacebookFriendsCount("gpeipman")<br />
    Facebook likes: @Counter.GetFacebookLikes("http://www.eindhovenmetalmeeting.nl/")<br />
    Delicious saves count: @Counter.GetDeliciousSaveCount("http://youreffectiveleadership.com/")<br />

SocialCounter.NETAnd the result is shown on image on right.

You can use SocialCounter.NET by example on user profile pages and on your content pages where you want to show how many people have saved current page as bookmark.

SocialCounter.NET supports also LinkedIn, RSS-feeds and Google Plus accounts. In future – I hope – they will add support for more social networks to their library.



Published at DZone with permission of Gunnar Peipman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}