title: onCompleted() method user is null
body: <p>Hi I am working with facebook login.</p>
  
  <p><strong>LandingFragment.java</strong></p>
  
  <pre><code>@Override
      public void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          if(ConstantMethods.isNetworkAvailable()){
              GetOrCreateFacebookActiveSession(savedInstanceState);
          }
          GetKeyHash();
  
      }
  </code></pre>
  
  <p>//button click listener</p>
  
  <pre><code>faceBookLoginButton.setOnClickListener(new onFacebookLoginListener());
  </code></pre>
  
  <p><strong>//onFacebookLoginListener()</strong></p>
  
  <p>// facebook login
  private class onFacebookLoginListener implements OnClickListener {</p>
  
  <pre><code>@Override
  public void onClick(View v) {
  
      if (ConstantMethods.isNetworkAvailable()) {
  
  
                  hideKeyBoard();
                  FacebookLoginUtility utility = new FacebookLoginUtility(getActivity());
  
                  Session session = Session.getActiveSession();
                  if (!session.isOpened()) {
                      new FacebookLoginUtility(getActivity(),LandingFragment.this).loginToFacebook(getActivity());
                  } else {
                      utility.fetch_User_Data(getActivity());
                  }
  
  
  
      } else {
          ConstantMethods.showErrorDialog(getActivity(), getResources()
                  .getString(R.string.network_conn_loss));
      }
  
  }
  }
  </code></pre>
  
  <p><strong>FacebookLoginUtility.java</strong> // just a class not an Activity</p>
  
  <p>Here I copied all the stuff whatever I have implemented in this class.</p>
  
  <pre><code>public class FacebookLoginUtility {
  
      private Context mContext;
      private Session.StatusCallback statusCallback;
      public static GraphUser FBuser;
      private LandingFragment mLandingFragment;
  
      public FacebookLoginUtility(Context mContext) {
          super();
          this.mContext = mContext;
      }
  
      public FacebookLoginUtility(Context mContext,
              LandingFragment landingFragment) {
          super();
          this.mContext = mContext;
          this.mLandingFragment = landingFragment;
      }
  
      public void loginToFacebook(Context context) {
          if (isNetworkAvailable()) {
              Session session = Session.getActiveSession();
  
              // if session is in exceptional state
              if (session.getState() == SessionState.CLOSED_LOGIN_FAILED
                      || session.getState() == SessionState.OPENING) {
                  session.closeAndClearTokenInformation();
              }
  
              if (!session.isOpened() &amp;&amp; !session.isClosed()) {
                  String[] PERMISSION_ARRAY_READ = { "email", "user_birthday" };
                  List&lt;String&gt; PERMISSION_LIST = Arrays
                          .asList(PERMISSION_ARRAY_READ);
                  session.openForRead(new Session.OpenRequest((Activity) context)
                          .setPermissions(PERMISSION_LIST).setCallback(
                                  statusCallback));
              } else {
                  Session.openActiveSession((Activity) context, true,
                          statusCallback);
              }
          } else {
  
              // showAlertDialog("Please check your internet connection!");
          }
      }
  
      public void fetch_User_Data(final Context mContext) {
  
          // request a new session with read permissions if session is opened with
          // publish permissions
          Session session = Session.getActiveSession();
          List&lt;String&gt; permissions = session.getPermissions();
          try {
              if (!isSubsetOf(Arrays.asList("email", "user_birthday"),
                      permissions)) {
                  Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(
                          (Activity) mContext, Arrays.asList("email",
                                  "user_birthday"));
                  session.requestNewReadPermissions(newPermissionsRequest);
              }
          } catch (Exception e1) {
              // TODO Auto-generated catch block
              e1.printStackTrace();
          }
  
          // Upgraded
          Request.newMeRequest(session, new Request.GraphUserCallback() {
  
              @Override
              public void onCompleted(GraphUser user, Response response) {
                  // TODO Auto-generated method stub
                  System.out.println("" + user);
                  if (user != null) {
                      FBuser = user;
                      mLandingFragment.getFacebookUserDetails(user
                              .getInnerJSONObject().toString());
                      /*
                       * setRegisterValuesUsingFacebook(user.getInnerJSONObject()
                       * .toString());
                       */
                  } else {
                      Toast.makeText(mContext, "Unable to get user profile data",
                              Toast.LENGTH_SHORT).show();
                  }
              }
          }).executeAsync();
  
      }
  
      private boolean isNetworkAvailable() {
          ConnectivityManager connectivityManager = (ConnectivityManager) mContext
                  .getSystemService(Context.CONNECTIVITY_SERVICE);
          NetworkInfo activeNetworkInfo = connectivityManager
                  .getActiveNetworkInfo();
          // return activeNetworkInfo.getState() == NetworkInfo.State.CONNECTED;
  
          return (activeNetworkInfo != null)
                  &amp;&amp; activeNetworkInfo.isConnectedOrConnecting();
      }
  
      public static boolean isSubsetOf(Collection&lt;String&gt; subset,
              Collection&lt;String&gt; superset) {
          for (String string : subset) {
              if (!superset.contains(string)) {
                  return false;
              }
          }
          return true;
      }
  
  }
  </code></pre>
  
  <p>In this class the onCompleted() method,the user object gets null value. So that I can't get the user details.</p>
  
  <p>From the above explanation, </p>
  
  <ol>
  <li>I am trying to login from Fragment</li>
  <li>I wrote separate class for login. Because I need to reuse this in some other page of my app.(Login options given in multiple pages of app).</li>
  </ol>
  
  <p>How could I get the user details ? </p>