当我写这行时,这段代码
#import <Foundation/Foundation.h>
#import "cocos2d.h"
#import "FBConnect.h"
//Register the delegates with this layer
@interface GameLayer :CCLayer<FBDialogDelegate, FBSessionDelegate, FBRequestDelegate>
{
//******************************************************/
// This is the facebook session that we use to interface
// with facebook, EVERYTHING facebook related relies
// on this: Login, Publishing Stories, etc...
//******************************************************/
FBSession *_session;// Error occur:
}
//******************************************************
// Facebook notifications from MenuLayer to do the work
//******************************************************
-(void)LogOutFaceBook:(NSNotification *)notification;
-(void)LoginFaceBook:(NSNotification *)notification;
@end
出现此错误: 错误:'FBSession'之前的预期说明符限定符列表
我该如何解决这个问题?我在我的项目中连接了FBConnect文件夹和FBConnect.bundle。我该怎么办?
答案 0 :(得分:0)
尝试
#import "FBConnect/FBConnect.h"
#import "FBConnect/FBSession.h"
如果按住Command键并双击FBSession,它会带你进入定义吗?如果没有,看起来您没有正确包含FBConnect文件。
确保您正确遵循其github页面上提到的所有步骤。