title: Login is working properly but friend list is not shown and application crash due to null pointer exception
body: <p>I'm new to facebook integaration, please help me with following issue:</p>
  
  <p>null pointer exception at on click of the button of the alert box named as facebook    </p>
  
  <pre><code>    private void onClickPickFriends() {
          final FriendPickerFragment fragment = new FriendPickerFragment();
  
          setFriendPickerListeners(fragment);
  
          showPickerFragment(fragment);
  }
  
  //
      private void showPickerFragment(PickerFragment&lt;?&gt; fragment) {
          fragment.setOnErrorListener(new PickerFragment.OnErrorListener() {
          @Override
              public void onError(PickerFragment&lt;?&gt; pickerFragment,
                      FacebookException error) {
                  String text = getString(R.string.exception, error.getMessage());
                  Toast toast = Toast.makeText(MainActivity.this, text,
                      Toast.LENGTH_SHORT);
              toast.show();
                  Log.e("error", error.getMessage());
          }
      });
  
          FragmentManager fm = getSupportFragmentManager();
          fm.beginTransaction().replace(R.id.fragContainer, fragment)
                  .addToBackStack(null).commit();
  
          controlsContainer.setVisibility(View.GONE);
  
      // We want the fragment fully created so we can use it immediately.
          fm.executePendingTransactions();
  
          fragment.loadData(false);
  }
  
      private void setFriendPickerListeners(final FriendPickerFragment fragment) {
          fragment.setOnDoneButtonClickedListener(new                              FriendPickerFragment.OnDoneButtonClickedListener() {
          @Override
               public void onDoneButtonClicked(PickerFragment&lt;?&gt; pickerFragment) {
                  onFriendPickerDone(fragment);
          }
      });
  }
  
      private void onFriendPickerDone(FriendPickerFragment fragment) {
          FragmentManager fm = getSupportFragmentManager();
          fm.popBackStack();
  
      String results = "";
  
          List&lt;GraphUser&gt; selection = fragment.getSelection();
      tags = selection;
      if (selection != null &amp;&amp; selection.size() &gt; 0) {
              ArrayList&lt;String&gt; names = new ArrayList&lt;String&gt;();
              for (GraphUser user : selection) {
                  names.add(user.getName());
          }
              results = TextUtils.join(", ", names);
      } else {
              results = getString(R.string.no_friends_selected);
      }
  
          showAlert(getString(R.string.you_picked), results);
  }
  
      private void showAlert(String title, String message) {
          new AlertDialog.Builder(this).setTitle(title).setMessage(message)
                  .setPositiveButton(R.strin`enter code here`g.ok, null).show();
  }
  </code></pre>
  
  <p>code of the button click:</p>
  
  <pre><code>build.setNegativeButton("Facebook",
                  new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int id) {
  
  
  
  
  
  onClickPickFriends();
  
                  }
  
              });
  </code></pre>