Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get LinkedIn Contacts or Friends List in Android?
    primarykey
    data
    text
    <p>Can any one help me to get LinkedIn Contacts or Friends or Connections List using LinkedIn API linkedin-j-android.jar.I am able to get all Current User Profile Information but don't know how to get Contacts or friends list.I have found a lot here on SO as well as on Google but still not got the Proper Solution yet.Please Someone Help me for my this issue.For that i have tried this.</p> <pre><code>ProgressDialog progressDialog = new ProgressDialog(this); LinkedinDialog d = new LinkedinDialog(this, progressDialog); d.show(); // set call back listener to get oauth_verifier value d.setVerifierListener(new OnVerifyListener() { @Override public void onVerify(String verifier) { try { accessToken = LinkedinDialog.oAuthService .getOAuthAccessToken(LinkedinDialog.liToken, verifier); LinkedinDialog.factory.createLinkedInApiClient(accessToken); client = factory.createLinkedInApiClient(accessToken); // client.postNetworkUpdate("Testing by Mukesh!!! LinkedIn wall post from Android app"); Loggger.i(TAG, "ln_access_token: " + accessToken.getToken()); Loggger.i(TAG, "ln_access_token: " + accessToken.getTokenSecret()); com.google.code.linkedinapi.schema.Person profile = client .getProfileForCurrentUser(EnumSet.of( ProfileField.ID, ProfileField.FIRST_NAME, ProfileField.LAST_NAME, ProfileField.CONNECTIONS)); linkedInID = profile.getId(); Loggger.i(TAG, "PersonID : " + linkedInID); linkedInFirstName = profile.getFirstName(); linkedInLastName = profile.getLastName(); Connections = profile.getConnections(); Log.e(TAG, "CONNECTION : " + Connections); List&lt;Contact&gt; contactList; contactList = (ArrayList&lt;Contact&gt;) getIntent() .getSerializableExtra("contact"); for (int i = 0; i &lt; contactList.size(); i++) { final Contact bean = contactList.get(i); Log.d("Custom-UI", "Display Name = " + bean.getDisplayName()); Log.d("Custom-UI", "First Name = " + bean.getFirstName()); Log.d("Custom-UI", "Last Name = " + bean.getLastName()); Log.d("Custom-UI", "Contact ID = " + bean.getId()); Log.d("Custom-UI", "Profile URL = " + bean.getProfileUrl()); Log.d("Custom-UI", "Profile Image URL = " + bean.getProfileImageURL()); Log.d("Custom-UI", "Email = " + bean.getEmail()); } Loggger.e(TAG, "connections : " + Connections); Loggger.e(TAG, "linkedin firstname : " + linkedInFirstName); Loggger.e(TAG, "linkedin lastname : " + linkedInLastName); } catch (Exception e) { e.printStackTrace(); } } }); // set progress dialog progressDialog.setMessage("Loading..."); progressDialog.setCancelable(true); progressDialog.show(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload