Shehan Ekanayake
Shehan Ekanayake

Reputation: 1621

Get profile info from Android LinkedIn SDK

How to get profile information from android Linkedin SDK? I logged in using Linkedin SDK but i'm unable to get profile information.

Upvotes: 1

Views: 2041

Answers (1)

Silvans Solanki
Silvans Solanki

Reputation: 1267

LinkedIn has released latest SDK for all the platform, you can use that and get the profile of users, below is the code of the same,

String url = "https://api.linkedin.com/v1/people/~:(id,first-name,last-name)";

APIHelper apiHelper = APIHelper.getInstance(getApplicationContext());
apiHelper.getRequest(this, url, new LinkedInConnection.Callback() {
    @Override
    public void onApiSuccess(ApiResponse apiResponse) {
        // Success!
    }

    @Override
    public void onApiError(LIApiError liApiError) {
        // Error making GET request!
    }
});

Also you can refer following url for detail, https://developer.linkedin.com/docs/android-sdk

Upvotes: 2

Related Questions