Getting Started

Set the credentials in the constructor or using the LinkedInClient properties:

var _linkedInClient = new LinkedInClient("CONSUMER_KEY", "CONSUMER_SECRET", "WEBSITE"); 
//if you need other permissions, you have to make a List and use it in the LoginAsync function
 var permissions = new List<Permission>();
 permissions.Add(Permission.BasicProfile);
 permissions.Add(Permission.FullProfile);
 permissions.Add(Permission.EmailAddress);
 permissions.Add(Permission.Network);
//if the user grants you the permissions, the functions returns true
 var loggedIn = await _linkedInClient.LoginAsync(permissions);
//if you don't need any special permissions, you can send null, or call the overloaded
//function that has no paramater like this:
//  var loggedIn = await _linkedInClient.LoginAsync();
if (loggedIn == false)
 {
          // Login failed
 }
else
{
   // Login succeeded
  //the information about the authenticated user is in the property _linkedInClient.AuthenticatedUser
  //you can get the connections from _linkedInClient.AuthenticatedUser.Connections
}


Here's a screenshot where you can understand the code better:
example.png

Last edited Aug 20, 2013 at 8:05 PM by bogdanbujdea, version 5

Comments

No comments yet.