Skip to content

cagrik/Social-Shares

Repository files navigation

Social Shares

Social Shares

Social Shares is a .net library to get an url's share count most popular 10 social network services. To install Social Shares, run the following command in the Package Manager Console
PM> Install-Package SocialShares or Download Project and add reference SocialShares.dll on your project.

Depencies

You must add Json.net(v 6.0 or Higher) references on your project To install Json.NET, run the following command in the Package Manager Console

Install-Package Package Newtonsoft.Json

if you've already instaled (lower than 6.0) run this. command.

Update-Package Newtonsoft.Json

Social Networks

Usage

Get single service result
var shareResult = Facebook.GetShares(url); string result = String.Format("Your Link {0} , published {1} times on {2}", shareResult.url, shareResult.count, shareResult.SocialNetwork);
Get multiple service result
List socialNetworks = new List(); socialNetworks.Add(SocialNetworks.Facebook); socialNetworks.Add(SocialNetworks.Twitter); socialNetworks.Add(SocialNetworks.Vk); SocialShare s = new SocialShare(); var results= s.GetUrlsShares(url,socialNetworks); foreach (var item in results) { string result = String.Format("Your Link {0} , published {1} times on {2}", item.url, item.count, item.SocialNetwork); }
Get All Result

      SocialShare s = new SocialShare();
      var results=  s.GetAll(url);
      foreach (var item in results)
      {
         string result = String.Format("Your Link {0} , published {1} times on {2}", item.url, item.count, item.SocialNetwork);
      }

Keep Development Alive PayPal cagri058@hotmail.com

About

Get URL shares on social networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages