I\'m switching some Android Facebook code from an Activity
to a Fragment
. Prior to the switch everything worked fine, but now the
We don't need to configure onActivityResult inside main activity of fragment class and inside fragment to. Just put below code inside main activity that contains your fragment and do rest of facebook sdk code inside fragment ...its so simple.
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data)
{
super.onActivityResult(requestCode, resultCode, data);
Session.getActiveSession().onActivityResult(ChatScreen.this, requestCode,
resultCode, data);
}