嗯,說的稱號,我得到的,我把SSO代碼並稱類兩個錯誤:授權,AuthorizeCallback未定義類型的Facebook
1)「的方法,授權是未定義類型的Facebook 」 ...... 2)‘構造的Facebook未定義’......
我得到同樣的錯誤AuthorizeCallback ...
我不知道該怎麼辦......我也跟着教程即「FB」創建(「Android教程」)...
這是代碼:
package my.package.namespace;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.facebook.android.*;
import com.facebook.android.Facebook.*;
public class Facebook extends Activity {
Facebook fbclient = new Facebook("myappid");
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
fbclient.authorize(this, new DialogListener() {
@Override
public void onComplete(Bundle values) {}
@Override
public void onFacebookError(FacebookError error) {}
@Override
public void onError(DialogError e) {}
@Override
public void onCancel() {}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
fbclient.authorizeCallback(requestCode, resultCode, data);
}
}
有在項目src中添加來自fb sdk的com文件夾嗎? – 2012-04-06 16:12:53
是的,我添加了整個文件夾... – 2012-04-11 12:41:29
然後工作與否? – 2012-04-11 12:42:10