Using SocialCounter.NET with ASP.NET MVC

Posted by DigiMortal on ASP.net Weblogs See other posts from ASP.net Weblogs or by DigiMortal
Published on Thu, 05 Jul 2012 19:56:29 GMT Indexed on 2012/07/05 21:16 UTC
Read the original article Hit count: 510

Filed under:
|

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"
;
}

<h2>Social</h2>
<p>
    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 />
</p
>

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.

© ASP.net Weblogs or respective owner

Related posts about ASP.NET

Related posts about mvc