title: java.lang.NullPointerException: Argument 'applicationId' cannot be null - using PARSE facebook login
body: <p>I am trying to use parse facebook login feature and started by referring <a href="https://github.com/ParsePlatform/IntegratingFacebookTutorial/tree/master/IntegratingFacebookTutorial-Android/IntegratingFacebookTutorial" rel="nofollow">this tutorial</a> of parse facebook integration. I am using a LoginActivity which will call the ParseFacebookUtils.logIn(permissions, LoginActivity.this, new LogInCallback() but I am getting the following exception</p>
  
  <pre><code>02-07 14:22:16.485  29990-29990/prototype.quest.cashquest E/AndroidRuntime﹕ FATAL EXCEPTION: main
  Process: prototype.quest.cashquest, PID: 29990
  java.lang.NullPointerException: Argument 'applicationId' cannot be null
          at com.facebook.internal.Validate.notNull(Validate.java:29)
          at com.facebook.Session.&lt;init&gt;(Session.java:281)
          at com.facebook.Session.&lt;init&gt;(Session.java:270)
          at com.facebook.Session$Builder.build(Session.java:1822)
          at com.parse.FacebookAuthenticationProvider.authenticate(FacebookAuthenticationProvider.java:116)
          at com.parse.ParseUser.authenticateAsync(ParseUser.java:1500)
          at com.parse.ParseUser.logInWithAsync(ParseUser.java:1520)
          at com.parse.ParseUser.logInWithAsync(ParseUser.java:1309)
          at com.parse.ParseFacebookUtils.logInInBackground(ParseFacebookUtils.java:478)
          at com.parse.ParseFacebookUtils.logIn(ParseFacebookUtils.java:545)
          at prototype.quest.cashquest.LoginActivity.onLoginClick(LoginActivity.java:143)
          at prototype.quest.cashquest.LoginActivity$1.onClick(LoginActivity.java:117)
          at android.view.View.performClick(View.java:4654)
          at android.view.View$PerformClick.run(View.java:19438)
          at android.os.Handler.handleCallback(Handler.java:733)
          at android.os.Handler.dispatchMessage(Handler.java:95)
          at android.os.Looper.loop(Looper.java:146)
          at android.app.ActivityThread.main(ActivityThread.java:5487)
          at java.lang.reflect.Method.invokeNative(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:515)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
          at dalvik.system.NativeStart.main(Native Method)
  </code></pre>
  
  <p>Here is my LoginActivity:</p>
  
  <pre><code>public class LoginActivity extends Activity {
  
  private Dialog progressDialog;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.main);
      Button login = (Button) findViewById(R.id.fb);
      login.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              onLoginClick(v);
              // Starts an intent for the sign up activity
          }
      });
      // Check if there is a currently logged in user
      // and it's linked to a Facebook account.
      ParseUser currentUser = ParseUser.getCurrentUser();
      if ((currentUser != null) &amp;&amp; ParseFacebookUtils.isLinked(currentUser)) {
          // Go to the user info activity
          showUserDetailsActivity();
      }
  }
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      ParseFacebookUtils.finishAuthentication(requestCode, resultCode, data);
  }
  
  public void onLoginClick(View v) {
      progressDialog = ProgressDialog.show(LoginActivity.this, "", "Logging in...", true);
  
      List&lt;String&gt; permissions = Arrays.asList("public_profile");
      ParseFacebookUtils.logIn(permissions, LoginActivity.this, new LogInCallback() {
          @Override
          public void done(ParseUser user, ParseException err) {
              progressDialog.dismiss();
              if (user == null) {
                  Log.d("Facebook_login", "Uh oh. The user cancelled the Facebook login.");
              } else if (user.isNew()) {
                  Log.d("Facebook_login", "User signed up and logged in through Facebook!");
                  showUserDetailsActivity();
              } else {
                  Log.d("Facebook_login", "User logged in through Facebook!");
                  showUserDetailsActivity();
              }
          }
      });
  }
  
  private void showUserDetailsActivity() {
      Intent intent = new Intent(LoginActivity.this, MainActivity.class);
      startActivity(intent);
    }
  }
  </code></pre>
  
  <p>Here is my main.xml used by login activity:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_marginTop="100dp"
      android:gravity="center"
      android:text="@string/login"
      android:textSize="18sp" /&gt;
  
  &lt;Button
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center_horizontal"
      android:layout_marginTop="100dp"
      android:id="@+id/fb"
      android:text="@string/com_facebook_loginview_log_in_button"
      android:textColor="@color/com_facebook_loginview_text_color"
      android:textSize="@dimen/com_facebook_loginview_text_size"
      android:textStyle="bold"
  
      android:background="@drawable/com_facebook_button_blue"
      android:drawableLeft="@drawable/com_facebook_inverse_icon"
      android:drawablePadding="@dimen/com_facebook_likebutton_compound_drawable_padding"
      android:paddingLeft="@dimen/com_facebook_loginview_padding_left"
      android:paddingTop="@dimen/com_facebook_loginview_padding_top"
      android:paddingRight="@dimen/com_facebook_loginview_padding_right"
      android:paddingBottom="@dimen/com_facebook_loginview_padding_bottom"
      android:onClick="onLoginClick"/&gt;
   &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is thing that goes to manifest:</p>
  
  <pre><code>            &lt;activity android:name="com.facebook.LoginActivity"
          android:label="@string/app_name" /&gt;
      &lt;meta-data android:name="com.facebook.sdk.ApplicationId"
          android:value="my_facebook_id"/&gt;
  </code></pre>
  
  <p>I am not able to figure out the reason for the exception, It would be of immense help if someone can suggest me what might be going wrong with this</p>
  
  <p>I tried researching online by referring posts regarding the application_id cannot be null but the scenario is very different for them, so I thought of posting a fresh question, Thank you</p>