I want to integrate Facebook SDK3.0 in my project, but I have some crashes at the initialization part. I tried in two different ways:
- I am calling [[FBSession initWithAppId] ...], but I get GISABRT exception
[FBSession initWithAppID:permissions:urlSchemeSuffix:tokenCacheStrategy:]: unrecognized selector sent to instance 0x22c0890 wait_fences: failed to receive reply: 10004003 2012-09-04 17:40:46.353 iOSTemplate[236:707] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[FBSession initWithAppID:permissions:urlSchemeSuffix:tokenCacheStrategy:]: unrecognized selector sent to instance 0x22c0890'
My code looks like:
fb_session = [[FBSession alloc] initWithAppID:@"1234" //"1234" is not my app id. I use a valid one.
permissions:nil
urlSchemeSuffix:nil
tokenCacheStrategy:nil];//k_AppId
if(fb_session.state == FBSessionStateCreatedTokenLoaded)
{ ... }
- I tried to replace the initWithAppId function with the [[FBSession] init] function, but it's crashing at [FBSession state]. I read on internet and I saw that if I have Facebook 5.0 app, but I don't have that application.
fb_session = [[FBSession alloc] init]; if(fb_session.state == FBSessionStateCreatedTokenLoaded) { ... }