0

I need to use some features for both the new Facebook SDK 3.0 and the deprecated one in the same class like this :

#import <FacebookSDK/FacebookSDK.h>
#import "Facebook.h"

but I got some problems when importing these togethers in same class.

80% of my code are working on the new SDK 3.0 I just use the old one for the post and friend request but I cant use them at same time in the same class.

So is there any way to use them in the same ViewController?

3 Answers 3

2

No you can not do that directly, you can't have two classes with the same name in your project.

0

I solve it,,,

Instead of import all the library like this :

#import <FacebookSDK/FacebookSDK.h>

I Just import the only I need beside the old Facebook SDK like this :

#import "FBSession.h"
#import "FBProfilePictureView.h"
#import "FBRequestConnection.h"
#import "FBLoginView.h"
#import "Facebook.h"

And its working now :)

0

There is symbolic links in FacebookSDK.framework folder, practically this folder looks like this

FacebookSDK -> ./Versions/A/FacebookSDK
Headers -> ./Versions/A/Headers
Resources -> ./Versions/A/Resources

So current version is /Versions/A/Headers , the old version is /Versions/A/DeprecatedHeaders , you shout find way to mixed or to make "FacebookSDK_old.framework" for example and inside should be

Headers -> ./Versions/A/DeprecatedHeaders

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.