how to remain login in fb sdk after rebooting the android app
<p>I am making facebook login page in android and on login i fetch user details but when i close app and restart it all my user details gone and login activity again start it,but fb ask for log out.My question is i want to remain login unlit i log out.my code is</p>

<pre><code>      FacebookCallback&lt;LoginResult&gt; mCallBack=new 
FacebookCallback&lt;LoginResult&gt;() {
@Override
public void onSuccess(LoginResult loginResult) {


    // Facebook Email address
   GraphRequest request = GraphRequest.newMeRequest(
            loginResult.getAccessToken(),
            new GraphRequest.GraphJSONObjectCallback() {

                public void onCompleted(
                        JSONObject object,
                        GraphResponse response) {
                    Log.v("LoginActivity Response ", response.toString());

                  try {


                        Name = object.getString("name");
                      Email = object.getString("email");
                     // Gender=object.getString("gender");
                      BD=object.getString("link");




           profilePicUrl =   
     object.getJSONObject("picture").getJSONObject("data").getString("url");

            //    tv1.setText(profilePicUrl);
          shared prefernce
                      SharedPreferences sharedPref = 
    PreferenceManager.getDefaultSharedPreferences(userLogin.this);
                      //now get Editor
                      SharedPreferences.Editor editor = sharedPref.edit();
                      //put your value
                      editor.putString("name1",Name);
                      editor.putString("mail2", Email);
                      editor.putString("picture", profilePicUrl);
                      //commits your edits
                      editor.commit();

                      Intent returnIntent = new 
    Intent(userLogin.this,tabLayout.class);
                      returnIntent.putExtra("name1",Name);
                      returnIntent.putExtra("mail2", Email);
                      returnIntent.putExtra("picture", profilePicUrl);

                      startActivity(returnIntent);




                      //    finish();

                    }
                    catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
            });


    Bundle parameters = new Bundle();

    parameters.putString("fields", 
   "id,name,link,email,picture.type(large)");
    request.setParameters(parameters);
    request.executeAsync();




}

@Override
public void onCancel() {

}

@Override
public void onError(FacebookException error) {

}
};
    loginButton.registerCallback(callbackManager,mCallBack);

}
</code></pre>

<p>////</p>