1

Im using PFFacebookUtils to set up user login with parse and facebook. I am using the code exactly from this link: https://github.com/ParsePlatform/ParseUI-iOS/wiki/Integrate-Login-with-Facebook

Heres a look at my code:

 NSArray *permissionsArray = @[ @"user_about_me", @"user_relationships", @"user_birthday", @"user_location"];

// Login PFUser using Facebook
[PFFacebookUtils logInInBackgroundWithReadPermissions:permissionsArray block:^(PFUser *user, NSError *error) {
    if (!user) {
        NSLog(@"Uh oh. The user cancelled the Facebook login.");
    } else if (user.isNew) {
        NSLog(@"User signed up and logged in through Facebook!");
    } else {
        NSLog(@"User logged in through Facebook!");
    }
}];

Xcode is telling me that this method does not exist. Even though I know the method is and I have all of the right header files imported

#import "SWLoginViewController.h"
#import "PFFacebookUtils.h"
#import <Parse/Parse.h>
#import "SWUser.h"
#import "SWFacebookDataRetriever.h"
#import "SWHomeViewController.h"
#import "SWProfileViewController.h"
#import "Colours.h"
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import <ParseUI/ParseUI.h>
rmaddy
  • 314,917
  • 42
  • 532
  • 579
klmitchell2
  • 171
  • 2
  • 13
  • Can you show the actual error in the console? Also, did you remember to initialize facebook before this call? I believe the import statement should be: `#import ` – KerrM May 23 '15 at 22:29
  • Im not getting an error when I compile. Im unable to compile because of the error that's in the title. The Import that you mention was correct and I thought that would be be the fix but I am still getting the same error even with the new import statement. – klmitchell2 May 25 '15 at 00:30
  • How have you added the Parse framework? Via cocoapods? Can you still show the whole error? The part you copied in the title is only half of the error message you should get. – KerrM May 25 '15 at 09:03

1 Answers1

3

If you are using the old pod 'ParseFacebookUtils', instead update your podfile to use pod 'ParseFacebookUtilsV4' and then #import <ParseFacebookUtilsV4/PFFacebookUtils.h>

Mason Lee
  • 5,130
  • 1
  • 20
  • 15