title: Facebook delegates are not calling after authentication: cocos2d
body: <p>He guys, I am doing a photo share in my <code>cocos2d</code> application with <code>Facebook SDK</code>. I've a problem that: the login view with status <code>Not Logged In</code> is remaining even <code>after authentication</code>. I'm attaching the images: 
  <img src="https://i.stack.imgur.com/zAKMC.png" alt="enter image description here"></p>
  
  <p><strong>Problem:</strong> After clicking the <code>Skip</code> or <code>OK</code> button of the <code>Authentication page</code>, the status has to be changed as <code>Login</code>. But it isn't. No Facebook delegates are getting called after Auth(When I enter the page first time, <code>loginViewShowingLoggedOutUser</code> delegate was get called. After auth, nothing is get called.).</p>
  
  <p><strong>What I've done already:</strong></p>
  
  <ul>
  <li>Downloaded the Facebook SDK, attached to the project.</li>
  <li>Added <code>FacebookAppID</code>,<code>FacebookDisplayName</code> and <code>URL Schemes</code> in <code>info.plist</code>.</li>
  <li>Tried the integration with my <code>cocos2d</code> app.</li>
  <li>Added <code>&lt;FBLoginViewDelegate&gt;</code> in <code>.h</code>.</li>
  <li>Added <code>loginview.delegate = self</code> in <code>.m</code>.</li>
  </ul>
  
  <p>I'm also uploading the screenshot of what I've done in my <code>info.plist</code>:
  <img src="https://i.stack.imgur.com/dy2ki.png" alt="enter image description here"></p>
  
  <p>I am creating the login view as:</p>
  
  <pre><code>// Create Login View so that the app will be granted "status_update" permission.
  FBLoginView *loginview = [[FBLoginView alloc] init];
  
  loginview.frame = CGRectOffset(loginview.frame, 5, 5);
  #ifdef __IPHONE_7_0
  #ifdef __IPHONE_OS_VERSION_MAX_ALLOWED
  #if __IPHONE_OS_VERSION_MAX_ALLOWED &gt;= __IPHONE_7_0
      if ([self respondsToSelector:@selector(setEdgesForExtendedLayout:)]) {
          loginview.frame = CGRectOffset(loginview.frame, 5, 25);
      }
  #endif
  #endif
  #endif
  loginview.delegate = self;
  [[[CCDirector sharedDirector]view]addSubview:loginview];
  [loginview sizeToFit];
  </code></pre>
  
  <p><strong>What I found:</strong>
  The following method in <code>appdelegate</code> is not get called:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application
              openURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication
           annotation:(id)annotation {
      // attempt to extract a token from the url
      return [FBAppCall handleOpenURL:url
                    sourceApplication:sourceApplication
                      fallbackHandler:^(FBAppCall *call) {
                          NSLog(@"In fallback handler");
                      }];
  }
  </code></pre>
  
  <p><strong>Further info:</strong></p>
  
  <ul>
  <li>Xcode Version 5.0.1</li>
  <li>iOS Version 7.0</li>
  <li>facebook-ios-sdk-3.9</li>
  </ul>
  
  <p>Any help ASAP is appreciable.</p>
  
  <p>Thanks. </p>