title: Error while initializing facebook sdk
body: <p>I'm following the <a href="https://developers.facebook.com/docs/android/login-with-facebook/#step2" rel="nofollow">official login tutorial</a> and suddenly I've got an error. I'm new to android so I'm a bit confused. So, here is my <code>FBMainFragment</code> like <code>MainFragment</code> in official tutorial:</p>
  
  <pre><code>public class FBMainFragment extends android.support.v4.app.Fragment {
  
  private Session.StatusCallback callback = new Session.StatusCallback() {
      @Override
      public void call(Session session, SessionState state, Exception exception) {
          onSessionStateChange(session, state, exception);
      }
  };
  
  private UiLifecycleHelper uiHelper;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      uiHelper = new UiLifecycleHelper(getActivity(), callback);
      uiHelper.onCreate(savedInstanceState);
  }
  
  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
      View view = inflater.inflate(R.layout.social_networks, container, false);
  
      LoginButton authButton = (LoginButton) view.findViewById(R.id.FB_Login);
      authButton.setFragment(this);
  
      return view;
  }
  
  private void onSessionStateChange(Session session, SessionState state, Exception exception) {
      if (state.isOpened()) {
          Log.i(MenuActivity.TAG, "Logged in...");
      } else if (state.isClosed()) {
          Log.i(MenuActivity.TAG, "Logged out...");
      }
  }
  
  @Override
  public void onResume() {
      super.onResume();
      // For scenarios where the main activity is launched and user
      // session is not null, the session state change notification
      // may not be triggered. Trigger it if it's open/closed.
      Session session = Session.getActiveSession();
      if (session != null &amp;&amp;
              (session.isOpened() || session.isClosed()) ) {
          onSessionStateChange(session, session.getState(), null);
      }
  
      uiHelper.onResume();
  }
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      uiHelper.onActivityResult(requestCode, resultCode, data);
  }
  
  @Override
  public void onPause() {
      super.onPause();
      uiHelper.onPause();
  }
  
  @Override
  public void onDestroy() {
      super.onDestroy();
      uiHelper.onDestroy();
  }
  
  @Override
  public void onSaveInstanceState(Bundle outState) {
      super.onSaveInstanceState(outState);
      uiHelper.onSaveInstanceState(outState);
  }
  </code></pre>
  
  <p>... and here is my <code>SocialNetworksActivity</code> class like <code>MainActivity</code> in off. doc.:</p>
  
  <pre><code>public class SocialNetworksActivity extends FragmentActivity {
  
  private FBMainFragment fbMainFragment;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      if (savedInstanceState == null) {
          // Add the fragment on initial activity setup
          fbMainFragment = new FBMainFragment();
          getSupportFragmentManager()
                  .beginTransaction()
                  .add(android.R.id.content, fbMainFragment)
                  .commit();
      } else {
          // Or set the fragment from restored state info
          fbMainFragment = (FBMainFragment) getSupportFragmentManager().findFragmentById(android.R.id.content);
      }
  }
  </code></pre>
  
  <p>As you see, I don't finished the tutorial yet. Now I'm in the end of the 2 part. But, as it sais, <em>Build and run your project. Log in with Facebook. You should be taken through the permissions screen.</em>. So i tryed to run my project and my app just felt. Any ideas? ;)</p>