title: How to get LinkedIn Profile information other then the default information Android
body: <p>I am getting the default information of user like Firstname and last name one URL(Site-standard Url), But i want to access the User_id and smilar info . I follow "https://developer.linkedin.com/documents/profile-api" and implement like following code.
  Please Help me out. I hit and try many things but could not get success.</p>
  
  <pre><code>public class LinkedInTestActivity extends Activity {
  
      public static final String CONSUMER_KEY = "XXXXXXXXXXXXXXXX";
      public static final String CONSUMER_SECRET = "XXXXXXXXXXXXXXXX";`enter code here`
      LinkedInAccessToken accessToken;
      public static final String APP_NAME = "LITest";
      public static final String OAUTH_CALLBACK_SCHEME = "x-oauthflow-linkedin";
      public static final String OAUTH_CALLBACK_HOST = "callback";
      public static final String OAUTH_CALLBACK_URL = OAUTH_CALLBACK_SCHEME+ "://" + OAUTH_CALLBACK_HOST;
  
      final LinkedInOAuthService oAuthService = LinkedInOAuthServiceFactory.getInstance().createLinkedInOAuthService(CONSUMER_KEY,CONSUMER_SECRET);
      final LinkedInApiClientFactory factory = LinkedInApiClientFactory.newInstance(CONSUMER_KEY, CONSUMER_SECRET);
      LinkedInRequestToken liToken;
      LinkedInApiClient client;
  
      TextView tv = null;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          tv = (TextView) findViewById(R.id.tv);
          liToken = oAuthService.getOAuthRequestToken(OAUTH_CALLBACK_URL);
          Log.e("liToken.getAuthorizationUrl()",""+liToken.getAuthorizationUrl());
          Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(liToken.getAuthorizationUrl()));
          startActivity(i);
      }
  
      @Override
      protected void onNewIntent(Intent intent) {
          String verifier = intent.getData().getQueryParameter("oauth_verifier");
          Log.e("Verifier--------&gt;",""+verifier);
          Log.e("liToken--------&gt;",""+liToken);
          accessToken = oAuthService.getOAuthAccessToken(liToken, verifier);
          Log.e("accessToken--------&gt;",""+accessToken.getToken());
          client = factory.createLinkedInApiClient(accessToken);
          client.postNetworkUpdate("LinkedIn Android app test");
          //      Person p = client.getProfileByUrl("http://api.linkedin.com/v1/people/~", ProfileType.STANDARD);
  
          Person p =client.getProfileForCurrentUser();
          p.getDateOfBirth();
          p.getApiStandardProfileRequest();
          p.getSiteStandardProfileRequest().getUrl();
          p.getHeadline();
          tv.setText(p.getLastName() + ", " + p.getFirstName()+ " DOB "+ p.getDateOfBirth());
  
          if (accessToken == null) {
              throw new IllegalArgumentException("access token cannot be null.");
          }
          try {
              URL url = new URL(LinkedInApiUrls.GET_CONNECTIONS_FOR_CURRENT_USER);
              HttpURLConnection request = (HttpURLConnection) url.openConnection();
  
              final OAuthConsumer consumer = getOAuthConsumer();
              consumer.setTokenWithSecret(accessToken.getToken(), accessToken.getTokenSecret());
              consumer.sign(request);
              request.connect();
  
              DefaultHttpClient httpclient = new DefaultHttpClient();
              HttpPost post = new HttpPost("http://api.linkedin.com/v1/people/~:(id,first-name,last-name,industry,headline,public-profile-url)");
              consumer.sign(post); // here need the consumer for sign in for post the share
              org.apache.http.HttpResponse response = httpclient.execute(post);
              Log.e("response",""+response.getHeaders(verifier).toString());
  
      } 
  
      protected OAuthConsumer getOAuthConsumer() {
          DefaultOAuthConsumer consumer = new DefaultOAuthConsumer(CONSUMER
  _KEY, CONSUMER_SECRET);
  consumer.setMessageSigner(new HmacSha1MessageSigner());
  consumer.setSigningStrategy(new AuthorizationHeaderSigningStrategy());
  return consumer;
      }
  }
  </code></pre>