我只是想在我的应用程序中使用 Facebook 登录。我的应用程序因此错误而崩溃“无法保存哪个视图具有焦点,因为焦点视图 org.cocos2dx.lib.Cocos2dxGLSurfaceView@405ed960 没有 id”这是我的 Facebook 集成代码:
public class wtpbgamazon extends Cocos2dxActivity{
private Cocos2dxGLSurfaceView mGLView;
private static Chartboost cb;
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
PurchasingManager.registerObserver(new amazonobserver());
// start Facebook Login
Session.openActiveSession(this, true, new Session.StatusCallback() {
@Override
public void call(Session session, SessionState state, Exception exception) {
if (session.isOpened()) {
// make request to the /me API
Request.executeMeRequestAsync(session, new Request.GraphUserCallback() {
// callback after Graph API response with user object
@Override
public void onCompleted(GraphUser user, Response response) {
if (user != null) {
//todo
}
}
});
}
}
});
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.v("onActivityResult Was Called", "good");
super.onActivityResult(requestCode, resultCode, data);
Session.getActiveSession().onActivityResult(this, requestCode, resultCode, data);
}
有人可以帮我吗?谢谢