Chris Lin
Chris Lin

Reputation: 709

Facebook permission Facebook SDK for iOS 5

I am developing a facebook app and is wondering how to set the permission array.

in the Facebook SDK version before all I need to do is create an instance from Facebook.h and set the permission. But now the facebook.h file is no long there, and stopped work for SDK3.0 and 3.1.

Facebook said to import the depreciated files but if I do that I get lots of errors, so that didn't work at all.

and I cannot find any documents regard setting permission property on iOS 5 and later, could someone help me out?

thanks!!

Upvotes: 0

Views: 3197

Answers (1)

Ilker Baltaci
Ilker Baltaci

Reputation: 11787

[FBSession openActiveSessionWithPublishPermissions:[[NSArray alloc] initWithObjects:@"publish_stream",@"email", nil]
                                   defaultAudience:FBSessionDefaultAudienceFriends
                                      allowLoginUI:YES
                                 completionHandler:^(FBSession *session,
   FBSessionState state, NSError *error) {
     [self sessionStateChanged:session state:state error:error];
 }];

you can find a short tutroail and simple code samples in http://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/

Upvotes: 1

Related Questions