title: Facebook login not working Parse
body: <p>I'm trying to integrate Facebook login function to my app. </p>
  
  <p>When I click on "continue with Facebook button" everything works but the user info is not added to the parse database also the "logs" when login success or failure also not appearing in the logcat.</p>
  
  <p>Any help would be appreciated.</p>
  
  <pre><code>public class FacebookLoginActivity extends Activity {
  
  LoginButton loginButtonFB;
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      ParseFacebookUtils.onActivityResult(requestCode, resultCode, data);
  }
  
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      ParseAnalytics.trackAppOpenedInBackground(getIntent());
  
      final List&lt;String&gt; mPermissions = new ArrayList&lt;String&gt;() {{
          add("public_profile");
          add("email");
      }};
  
  
      loginButtonFB = findViewById(R.id.fb_login_button);
  
      loginButtonFB.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              ParseFacebookUtils.logInWithReadPermissionsInBackground(FacebookLoginActivity.this, mPermissions, new LogInCallback() {
                  @Override
                  public void done(final ParseUser parseUser, ParseException e) {
                      if (parseUser == null) {
  
                          Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
  
                      } else if (parseUser.isNew()) {
  
                          if (!ParseFacebookUtils.isLinked(parseUser)) {
                              ParseFacebookUtils.linkWithReadPermissionsInBackground(parseUser, FacebookLoginActivity.this, mPermissions, new SaveCallback() {
                                  @Override
                                  public void done(ParseException ex) {
                                      if (ParseFacebookUtils.isLinked(parseUser)) {
                                          Log.d("MyApp", "Woohoo, user logged in with Facebook!");
  
                                          Toast.makeText(FacebookLoginActivity.this, "Logged in",Toast.LENGTH_LONG).show();
  
                                      }
                                  }
                              });
                          }
                      } else {
                          if (!ParseFacebookUtils.isLinked(parseUser)) {
                              ParseFacebookUtils.linkWithReadPermissionsInBackground(parseUser, FacebookLoginActivity.this, mPermissions, new SaveCallback() {
                                  @Override
                                  public void done(ParseException ex) {
                                      if (ParseFacebookUtils.isLinked(parseUser)) {
                                          Log.d("MyApp", "Woohoo, user logged in with Facebook!");
                                          Toast.makeText(FacebookLoginActivity.this, "Logged in",Toast.LENGTH_LONG).show();
                                      }
                                  }
                              });
                          }
  
                      }
  
                  }
              });
          }
      });
  }
  </code></pre>
  
  <p>}</p>