user2776223
user2776223

Reputation:

Integrating LinkedIn with android

I have developed an application for social and I want integrating Facebook,LinkedIn, Google, so I know I how to integrate Facebook to the android but I am little confuse about LinkedIn so please provide me some Tutorial for integrate LinkedIn to the android

Thank you in advance..

Upvotes: 0

Views: 176

Answers (2)

Anton Krasov
Anton Krasov

Reputation: 124

please check my library: https://github.com/antonkrasov/AndroidSocialNetworks

It allows you simple integration with Facebook, LinkedIn, Twitter and Google Plus. All what you need is instantiate SocialNetworkManager and add it to your FragmentManager.

mSocialNetworkManager = (SocialNetworkManager) getFragmentManager().findFragmentByTag(SOCIAL_NETWORK_TAG);

if (mSocialNetworkManager == null) {
    mSocialNetworkManager = SocialNetworkManager.Builder.from(getActivity())
            .twitter(<< TWITTER  API TOKEN  >>, << TWITTER  API SECRET  >>)
            .linkedIn(<< LINKED_IN  API TOKEN  >>, << LINKED_IN API TOKEN  >>, "r_basicprofile+rw_nus+r_network+w_messages")
            .facebook()
            .googlePlus()
            .build();
    getFragmentManager().beginTransaction().add(mSocialNetworkManager, SOCIAL_NETWORK_TAG).commit();
}

Now you are able to execute requests, like: login, addFriend (send connection request for LinedIn), postMessage, postPhoto, getProfile...

mSocialNetworkManager.getTwitterSocialNetwork().requestLogin(new OnLoginCompleteListener() {
    @Override
    public void onLoginSuccess(int socialNetworkID) {

    }

    @Override
    public void onError(int socialNetworkID, String requestID, String errorMessage, Object data) {

    }
});

Upvotes: 1

eleven
eleven

Reputation: 6847

LinkedIn has no concept friend as Facebook. It has connection. Other apps could retrieve only 1st degree connections. More here: https://developer.linkedin.com/documents/connections-api

Upvotes: 0

Related Questions