LinkedIn Client Plugin For Xamarin

LinkedIn Plugin Xamarin Forms

Just released the LinkedIn Client Plugin, it makes the process of authenticating a user across Xamarin Forms, Xamarin.Android and Xamarin.iOS with LinkedIn SDK easier.

Set Up

The setup process for the plugin is pretty simple and it’s well documented on the LinkedIn Client Plugin GitHub page. you can complete the Setup process following these steps:

  • Install the nugget package into your PCL project and Client projects.

Use It

You just have to use LinkedInClient.Current

Login

Here is an example of how to launch the login to the LinkedIn Client:

    CrossLinkedInClient.Current.LoginAsync();

This method returns a LinkedInResponse object which contains the basic profile of the user that was authenticated as a string of raw JSON on its Data Property, this response class has the following structure:

Logout

Here is an example of how to log out of the LinkedIn Client:

    CrossLinkedInClient.Current.Logout();

Get Extra Fields from User Profile

You have a public method available that allows you to get extra information you might need from the user profile, just send a list of strings with the fields you require. (List of available fields)

Available Properties

  • ActiveToken (Signed In user Token)
  • TokenExpirationDate (Signed In user Token Expiration Date)

Events

All async methods also trigger events:

Official Google Sign In SDK Documentation:

https://developer.linkedin.com/docs

Full documentation of the project:

https://github.com/CrossGeeks/LinkedInClientPlugin

Xamarin Forms sample project:

https://github.com/CrossGeeks/LinkedInClientPlugin/tree/master/LinkedInClient/LinkedInClientSample

Made with ❤ by Pujols

(Visited 734 times, 1 visits today)

4 Comments

  1. Olivier January 15, 2019 at 3:46 am

    Hello,

    Great plug-in, working fine… until 2 days ago.
    I, then started to received errors from the LinkedInClientManager… saying that he didn’t complete the authorization process (I insist, this was working like a charm some time ago -connecting + retrieving LinkedIn basic profile information). This seems to be linked to the api changes done by LinkedIn.

    Luis, could you contact me to exchange information on how I can help you solving this issue?
    regards,
    Olivier

    Reply
    1. Pujolsluis January 17, 2019 at 11:25 pm

      Hi Olivier!

      Thanks for the heads up, I will verify this issue to see if I can replicate it and give you a follow up on it.

      Reply
      1. Olivier January 18, 2019 at 3:46 am

        Hi again,

        Here my AppCenter stackTrace for your help.

        According to my readings, LinkedIn changes the endpoint (to be verified) and the profile fields (FName, LName, PictureUri + email only) -> https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin

        Tell me if you need more info
        __________________________
        LinkedInClientManager+c.b__48_1 (LinkedIn.Platform.Errors.LIApiError error)
        APIHelper+ApiListener.OnApiError (LinkedIn.Platform.Errors.LIApiError error)
        IApiListenerInvoker.n_OnApiError_Lcom_linkedin_platform_errors_LIApiError_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_p0)
        (wrapper dynamic-method) System.Object.70(intptr,intptr,intptr)
        ___________________________

        Reply
        1. Pujolsluis January 19, 2019 at 12:56 am

          Thanks for the Info, Olivier will be checking it out during the weekend.

          It would be great if you can create an Issue with all this information on the GitHub page of the project so we can keep track of it there and discuss more about it.

          Reply

Leave a Reply to Olivier Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.