开发者

Facebook SSO error passing reference of App Delegate

开发者 https://www.devze.com 2023-03-09 06:02 出处:网络
I followed the example SSO on Facebook\'s developer website but am getting a strange warning message when I call the authorize message:

I followed the example SSO on Facebook's developer website but am getting a strange warning message when I call the authorize message:

- (BOOL)application:(UIAp开发者_如何学Goplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    [_window makeKeyAndVisible];

    facebook = [[Facebook alloc] initWithAppId:@"(my app's ID number)"];
    [facebook authorize:nil delegate:self];

    //[_window addSubview:viewController.view];
    //[[UIApplication sharedApplication] setStatusBarHidden:NO animated:YES];

    return YES;
}

The second line shows up with the warning: "Sending QueryTestingAppDelegate to parameter of incompatible type 'id'.

The project builds and runs, but won't do anything Facebook-related.

(I do have the correct App ID # filled in in the code).


In the AppDelegate header file, did you ensure it implemented the FBSessionDelegate protocol?

i.e.

#import "FBConnect.h"

@interface QueryTestingAppDelegate : NSObject <UIApplicationDelegate, FBSessionDelegate>

The Facebook documentation isn't terribly clear on this point but I think that should fix the warning.

0

精彩评论

暂无评论...
验证码 换一张
取 消