fb.authorize(ba.activity, new String[] {"publish_stream","read_friendlists"}, new DialogListener() {
@Override
public void onCancel() {
Log.d("B4A", "DialogListener onCancel");
}
@Override
public void onComplete(Bundle values) {
Log.d("B4A", "DialogListener onComplete");
Editor editor = sp.edit();
editor.putString("Access_Token", fb.getAccessToken());
editor.putLong("Expires", fb.getAccessExpires());
editor.commit();
if(DialogType == "feed"){
Log.d("B4A", "DialogListener showfeed");
showfeed(ba);
}else{
Log.d("B4A", "DialogListener apprequest");
apprequest(ba);
}
}
@Override
public void onError(DialogError derror) {
Log.d("B4A", "DialogListener onError");
}
@Override
public void onFacebookError(FacebookError ferror) {
Log.d("B4A", "DialogListener onFacebookError");
}
});