title: Facebook Access Token storing in android app
body: <p>Since the offline access is stopped by facebook now, how do I store/get a new access token. I have tried a lot. The code is below.
  I have to give the access token in <a href="https://graph.facebook.com/me/friends?access_token=" rel="nofollow">https://graph.facebook.com/me/friends?access_token=</a></p>
  
  <pre><code>String url = "https://graph.facebook.com/oauth/access_token?client_id=appid&amp;client_secret=secretid&amp;grant_type=fb_exchange_token&amp;fb_exchange_token=access_token";
  
  
  
              HttpClient httpclient = new DefaultHttpClient();
              HttpGet httpget = new HttpGet(url);
  
              try{
                  HttpResponse response = httpclient.execute(httpget);
  
                  HttpEntity entity = response.getEntity();
                  is = entity.getContent();
  
                  BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8);
                  StringBuilder sb = new StringBuilder();
                  String line = null;
  
                  while ((line = reader.readLine()) != null) {
  
                       sb.append(line + "\n");
  
                  }   
  
                  is.close();
                  result=sb.toString();
                  result = result.split("=")[1];
                  AppLog.logger(result);
  
              }
              catch(Exception e)
              {
                  AppLog.logger("Error in JSON");
              }
  </code></pre>
  
  <p>How to exchange token?? Please help.</p>