title: Unable to get User Profile from google using google apis in android
body: <p>I am trying to integrate google in my android app. I am using oauth for retriving request token, access token. I want User's FirstName, LastName, ScreenName, Email. Here is what I am trying to do,</p>
  
  <pre><code>public static final String CLIENT_ID = "XXXX";
  public static final String CLIENT_SECRET = "XXXX";
  private static final String SCOPE = "https://www.googleapis.com/auth/userinfo.profile";
  public static final String REQUEST_TOKEN_URL = "https://www.google.com/accounts/OAuthGetRequestToken";
  public static final String ACCESS_TOKEN_URL = "https://www.google.com/accounts/OAuthGetAccessToken";
  public static final String AUTHORIZE_URL = "https://www.google.com/accounts/OAuthAuthorizeToken";
  </code></pre>
  
  <p>I get connected to google asking to grant access for profile information. User grants the access, comes back to my application. Now I am trying to do this,</p>
  
  <pre><code>DefaultHttpClient httpClient = new DefaultHttpClient();
  String strUrl = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json";
  HttpPost request = new HttpPost(strUrl);
  </code></pre>
  
  <p>to get the user's profile. But In response I get only </p>
  
  <blockquote>
    <p>{</p>
  </blockquote>
  
  <p>No data. I tried a lot to get the user profile. Plz do tell me where I am doing wrong. Any links, sample code will be appreciated. Thanks in advance. </p>