Reputation: 255
I'm trying to make a log in with facebook but I keep getting a error message, " Use of undeclared identifier "FBSDKApplicationDelegate
" does anyone know how should I do it.
#import "AppDelegate.h"
#import "FacebookSDK.h"
#import <Parse/Parse.h>
#import <ParseFacebookUtils/PFFacebookUtils.h>
#import <FacebookSDK.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[Parse setApplicationId:@"xxxxxxxxxxxxxxxxxxxx"
clientKey:@"xxxxxxxxxxxxxxxxxxxx"];
[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];
[PFFacebookUtils initializeFacebook];
return [[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
}
Upvotes: 0
Views: 3659
Reputation: 55
you can import library:
#import <FacebookSDK/FacebookSDK.h>
Upvotes: 0
Reputation: 5187
Since version 4.X Facebook has split the SDK in 3 parts:
The SDK is now composed of three frameworks, FBSDKCoreKit, FBSDKLoginKit, and FBSDKShareKit.
So if you are using the latest SDK import FBSDKCoreKit and FBSDKLoginKit in your AppDelegate.
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
See the documentation for more.
Upvotes: 3
Reputation: 770
You need add Library:
#import <FacebookSDK/FacebookSDK.h>
Make sure this library you include in your project or add as framework if you not have then download from hereFacebookSDK
Upvotes: 1
Reputation:
If you want to work function Login Facebook. You need add Library:
#import <FacebookSDK/FacebookSDK.h>
Upvotes: 1
Reputation: 1455
You should add the FBSDKCoreKit.framework to Frameworks in Project Navigator and then use
#import <FBSDKCoreKit/FBSDKCoreKit.h>
See the full setup documentation here.
Upvotes: 1