I setup FB Login into an Activity and also created a class MainFragment.java which follows FB's tuturial perfectly. Found here: https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/
The login works well, but the App is stuck in the Fragment and therefore the rest of my App is not responding. Probably a simple fix. Wondering what I missed to add to ensure the remaining codes still executes? Here is my code added for the FB Login from my MainActivity class:
public class MainActivity extends FragmentActivity {
private MainFragment mainFragment;
The login works well, but the App is stuck in the Fragment and therefore the rest of my App is not responding. Probably a simple fix. Wondering what I missed to add to ensure the remaining codes still executes? Here is my code added for the FB Login from my MainActivity class:
public class MainActivity extends FragmentActivity {
private MainFragment mainFragment;
Code:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (savedInstanceState == null) {
// Add the fragment on initial activity setup
mainFragment = new MainFragment();
getSupportFragmentManager()
.beginTransaction()
.add(android.R.id.content, mainFragment)
.commit();
} else {
// Or set the fragment from restored state info
mainFragment = (MainFragment) getSupportFragmentManager()
.findFragmentById(android.R.id.content);
}