Issue with Android Facebook SDK
in my activity I use the following code to get Facebook authorization. facebook.authorize
is called but it does not enter in one of the listener event (onComplete, onFacebookError...). Anybody could help?
Facebook facebook = new Facebook(FACEBOOK_APPID);
facebook.authorize(ItemDetail.this, new String[] {"publish_stream"},
new DialogListener() {
@Override
public void onComplete(Bundle values) {
Log.i("ItemDetail", "Facebook onComplete");
}
@Override
public void onFacebookError(FacebookError error) {
Log.i("ItemDetail", "Facebook onFacebookError");
开发者_Python百科 }
@Override
public void onError(DialogError e) {
Log.i("ItemDetail", "Facebook onError");
}
@Override
public void onCancel() {
Log.i("ItemDetail", "Facebook onCancel");
}
}
);
You need to put this in your class:
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
facebook.authorizeCallback(requestCode, resultCode, data);
}
精彩评论