<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
@Override
protected void onActivityResult(final int requestCode,
final int resultCode, final Intent data){
super.onActivityResult(requestCode, resultCode, data);
callbackManager.onActivityResult(requestCode, resultCode, data);
...
}
if (AccessToken.getCurrentAccessToken() != null){
...
}
else{
AccountKit.getCurrentAccount(new AccountKitCallback<Account>(){
...
})
}
if (AccessToken.getCurrentAccessToken() != null){
Profile profile = Profile.getCurrentProfile();
}
if (AccessToken.getCurrentAccessToken() != null){
Profile currentProfile = Profile.getCurrentProfile();
if (currentProfile != null){
displayProfileInfo(currentProfile);
} else {
Profile.fetchProfileForCurrentAccessToken();
}
}