如果我的应用程序被授权使用Facebook [iOS 6,FB SDK 3.2] [英] Get if my app is authorized to use facebook [iOS 6, FB SDK 3.2]

查看:164
本文介绍了如果我的应用程序被授权使用Facebook [iOS 6,FB SDK 3.2]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么知道我的应用程序是否被用户授权使用Facebook?

how can i know is my app is authorized by user to use Facebook?

您可以在设置 - >隐私 - > Facebook中启用或禁用它。
我必须得到这个状态。

You can enable or disable it in "Settings -> Privacy -> Facebook". I have to get this state.

我正在使用Facebook 3.2

I'm using Facebook 3.2

谢谢大家!

推荐答案

您可以使用ACAccountStore获取Facebook帐户(如果可用)并检查是否授予访问权限:

You can use the ACAccountStore to get the Facebook account(if it is available) and check if the access is granted:

ACAccountStore *accountStore = [[ACAccountStore alloc] init];

ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];

if(accountType.accessGranted){
    //app has permissions
}else{
    //no permissions
}

这篇关于如果我的应用程序被授权使用Facebook [iOS 6,FB SDK 3.2]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆