title: How to connect facebook with java desktop application
body: <p>I need to connect and authenticate users from java desk top application , i have tried facebook-java-api using facebookjsonclient and facebookRestclient  but not able to get session key. is there any changes in facebook due to which we r not able to connect , or is there asny other best java api or example how to connect. my code is </p>
  
  <pre><code>private static void getUserID(String email, String password){
          String session = null;
          try {
  
              HttpClient http = new HttpClient();
  
              http.getHostConfiguration().setHost("www.facebook.com");
              String api_key = "key";
              String secret = "sec";
              FacebookJaxbRestClient client = new FacebookJaxbRestClient(api_key, secret);
                  System.out.println("====&gt;"+client.isDesktop());
  
              String token = client.auth_createToken();
              System.out.println(" :::::::"+token);
              System.out.println(" :::::::::: "+token);
              PostMethod post = new PostMethod("/login.php?");
  
              post.addParameter("api_key", api_key);
  
  
              post.addParameter("email", email);
              post.addParameter("pass", password);
  
  
              int postStatus = http.executeMethod(post);
                  System.out.println("url : " + post.getURI());
              System.out.println("Response : " + postStatus);
              for (Header h : post.getResponseHeaders()) {
                  System.out.println(h);
              }
              session = client.auth_getSession(token); // Here I am getting error
              System.out.println("Session string: " + session);
              long userid = client.users_getLoggedInUser();
              //System.out.println("User Id is : " + userid);*/
          } catch (FacebookException fe) {
  
              fe.printStackTrace();
  
          }catch(Exception e){
              e.printStackTrace();
          }
      }
  </code></pre>