I authenticate the user (or try) with my Android application that I am working on and all I get in the facebook dialog is that an error occurred without any details as to what the error is. It is possible that they will throw me to persecution or something like that. I followed http://developers.facebook.com/docs/guides/mobile/#android to create my login dialog.
The page says the use of the new Facebook ("YOUR_APP_ID"); which leads to an error, I also tried the api key, but it gives the same thing. I do nothing other than toasting, but I don't even get the answer in the callback until I press the return key to leave the facebook dialog
public class Base {
private Facebook fb;
public Base() {
fb = new Facebook("app_id_here");
}
public void onCreate(Bundle b) {
super.onCreate(b);
}
private void doLogin() {
fb.authorize(this, new DialogListener() {
public void onComplete(Bundle values) {
Toast.makeText(getApplicationContext(), values.toString(),
Toast.LENGTH_LONG).show();
}
public void onFacebookError(FacebookError error) {
Toast.makeText(getApplicationContext(), error.getMessage(),
Toast.LENGTH_LONG).show();
}
public void onError(DialogError e) {
Toast.makeText(getApplicationContext(), e.getMessage(),
Toast.LENGTH_LONG).show();
}
public void onCancel() {
Toast.makeText(getApplicationContext(),
"You must be registered and signed in to perform that action",
Toast.LENGTH_LONG).show();
}
});
}
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
fb.authorizeCallback(requestCode, resultCode, data);
}
}
Any idea why this will give an error or where / how I can find the cause of the error PS I also added a key hash in the "Mobile devices and devices" section of the FB application settings page, and this is not the same problem as the one found in the Login Error to the system with the wrong key error using the Facebook SDK I tried the sentences there. This does not work.
source
share