问题描述
我正在开发一个Facebook应用,并且想知道如何设置权限数组.
I am developing a facebook app and is wondering how to set the permission array.
,我需要做的就是从Facebook.h创建一个实例并设置权限.但是现在facebook.h文件已经不存在了,并停止了SDK3.0和3.1的工作.
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表示要导入已折旧的文件,但是如果这样做,我会收到很多错误,因此根本不起作用.
Facebook said to import the depreciated files but if I do that I get lots of errors, so that didn't work at all.
我找不到任何有关iOS 5及更高版本上的设置权限属性的文档,有人可以帮我吗?
and I cannot find any documents regard setting permission property on iOS 5 and later, could someone help me out?
谢谢!
推荐答案
[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];
}];
您可以在 http://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/
这篇关于Facebook权限iOS 5的Facebook SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!