Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

including deprecated facebook header folder gives error

I am using this link. But i am really stuck here, and i am getting 20 errors of duplicity and redefinition.

It happens when i replaced facebookSDK/FacebookSDK.h to Facebook.h . Before that as said in the tutorial i include a folder "Deprecated header" from Facebook sdk.

According to this Facebook tutorial :

Step 2: Sending the request

To invoke the Facebook dialogs you must reference the Facebook deprecated headers. The headers can be found here ~Documents/FacebookSDK/FacebookSDK.framework/Versions/A/DeprecatedHeaders. Drag the whole DeprecatedHeaders folder and deselect the ''Copy items into destination group's folder (if needed)'' option to add the headers as a reference.

Now you can make the required code changes. In your app delegate import the Facebook.h header file and replace the Facebook framework import declaration:

#import "Facebook.h"

This will allow you to make call to the FBDialog classes. The Facebook.h header includes the header files. If you have any problems with Xcode recognizing the Facebook.h file just close and reopen your Xcode project.

In the app delegate header file, declare a property that will hold the Facebook instance:

@property (strong, nonatomic) Facebook *facebook;

In the app delegate implementation file, synthesize the Facebook property:

@synthesize facebook = _facebook;

As soon as i do this .. i get errors and not able to compile.

Plz help

like image 728
YogiAR Avatar asked Oct 10 '12 05:10

YogiAR


1 Answers

solved it finally.

I removed errors using following steps:

i replaced #import "FacebookSDK/FacebookSDK.h" with #import "FBSession.h" everywhere in my project. And other thing i Only used #import "facebook.h " in Appdelegate.h. This solved the error for me and i did nothing extra

Hope this would help someone here

like image 104
YogiAR Avatar answered Nov 15 '22 05:11

YogiAR