CRDave
CRDave

Reputation: 9285

Facebook integration compatibility issue

I m creating app for iPhone. when user click share button detail displayed on screen are shared on facebook. I want my application to be work on both iOS 5 and iOS 6. Right now I have used facebook SDK 3.1. It is working fine with iOS 6 but not for iOS 5. It is giving this error:

2012-10-29 12:39:49.588 FacebookDemo[1715:c07] *** Terminating app due to uncaught exception
'com.facebook.sdk:InvalidOperationException', reason: 'FBSession: an attempt was made reauthorize 
permissions on an unopened session'

I think it is problem with some framework which require by facebook SDK like social.framework which are not available in iOS 5

what should I do to work this on iOS 5 and 6 both?

Upvotes: 0

Views: 2962

Answers (1)

Ilker Baltaci
Ilker Baltaci

Reputation: 11779

Generally you need beside FacebookSDK also AdSupport,Social and Accounts frameworks which are needed to be set to Optional since Accounts is only avaliable in IOs 5 and the other two is new in IOS 6

actually it is not realted with the backcompatibility. You get FBSession: an attempt was made reauthorize permissions on an unopened session when you want to make a new request when the session state is not open. MAke sure you before eacj request.

if (FBSession.activeSession.isOpen) {

//MAke you request 

}else{
//REopen your session
}

Upvotes: 2

Related Questions