Question

I work on a facebook connect integration, I work on this tutorial : - https://developers.facebook.com/docs/android/login-with-facebook/v2.0 It's working well : I get a connection, but since I have integrated the button in my activity, the rest of the activity stoped working. No interaction is possible in the rest of the activity.

In my main activity in the onCreate I have this code:

 if (savedInstanceState != null) {
        // Or set the fragment from restored state info
        mainFragment = (MainFragment) getSupportFragmentManager()
                .findFragmentById(android.R.id.content);
    } else {

        // Add the fragment on initial activity setup
        mainFragment = new MainFragment();
        getSupportFragmentManager()
                .beginTransaction()
                .add(android.R.id.content, mainFragment)
                .commit();

    }

I think it's the Fragment witch causes this issue, even if I am not very confortable dealing with fragments. My activity is a fragment activity and MainFragment extends fragment.

I read a lot of topic's but I didn't found any answers to solve my problem. Thanks in advance for your time.

Was it helpful?

Solution

I use an other tutorial and it's work see below :

http://javatechig.com/android/using-facebook-sdk-in-android-example

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top