user717452
user717452

Reputation: 111

iphone SSO Facebook implementation

Question regarding SSO Implementation of Facebook. I followed the instructions and added to the AppDelegate implementation code:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [[_viewController facebook] handleOpenURL:url];
}

however, I get the error,

unknown receiver _viewController, did you mean UIViewController?

I change it to that, and I get the warning,

class method +facebook not found

I am using the tutorial located here https://developers.facebook.com/blog/post/532/

Upvotes: 0

Views: 329

Answers (1)

Convolution
Convolution

Reputation: 2351

The method you are using to handle opening the url is implemented incorrectly. The link you provided has the following code sample. Which shows the application delegates Facebook object property calling the method handleOpenURL.

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    return [facebook handleOpenURL:url]; 
}

In the code you provided, you are attempting to call a class method called facebook on your instance of _viewController. UIViewController doesn't have a class method called 'facebook' this is why you're getting the warning.

class method + facebook not found

Upvotes: 1

Related Questions