facebook login issue
If enable the facebook account in settings, when change account can't open the session.
-(void)fbResync
{
ACAccountStore *accountStore;
ACAccountType *accountTypeFB;
if ((accountStore = [[ACAccountStore alloc] init]) && (accountTypeFB = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook] ) ){ NSArray *fbAccounts = [accountStore accountsWithAccountType:accountTypeFB];
id account;
if (fbAccounts && [fbAccounts count] > 0 && (account = [fbAccounts objectAtIndex:0])){ [accountStore renewCredentialsForAccount:account completion:^(ACAccountCredentialRenewResult renewResult, NSError *error) {
//we don't actually need to inspect renewResult or error.
if (error){ }
}];
}
}
[FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:YES
completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
if(error)
{
NSLog(@"Session error");
[self fbResync];
[NSThread sleepForTimeInterval:0.5]; //half a second
[FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:YES
completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
[self sessionStateChanged:session state:state error:error];
}]; }
else
[self sessionStateChanged:session state:state error:error];
}];
facebook login issue的更多相关文章
- issues about Facebook Login
在学习The complete iOS 9 Developer Course - Build 18 Apps 中的Letture134-Facebook Login,需要整合(integrate)Pa ...
- Facebook Login api
http://blog.kenyang.net/2012/01/androidfacebook-login-api.html http://blog.kenyang.net/2012/01/faceb ...
- Google Play sign sha1 转 Facebook login 需要的 hashkey
:4E:::::3A:1F::A6:0F:F6:A1:C2::E5::::2E | xxd -r -p | openssl base64 输出 M05IhBlQOh9jpg/2ocIx5QE4VS4= ...
- FaceBook登陆API -- Login with API calls
Login with API calls Related Topics Understanding sessions FBSession Error handling FBError FBLoginC ...
- facebook api之Access Tokens之Business Manager System User
Business Manager System User Make programatic, automated actions on ad objects or Pages, or do progr ...
- facebook充值实时更新接口文档翻译 希望对做facebook充值的小伙伴有帮助
Realtime Updates for Payments are an essential method by which you are informed of changes to orders ...
- [转]An introduction to OAuth 2.0 using Facebook in ASP.NET Core
本文转自:http://andrewlock.net/an-introduction-to-oauth-2-using-facebook-in-asp-net-core/ This is the ne ...
- Android 应用程序集成FaceBook 登录及二次封装
1.首先在Facebook 开发者平台注册一个账号 https://developers.facebook.com/ 开发者后台 https://developers.facebook.com/ap ...
- Facebook登录 AndroidStudio
简介 主页:https://www.facebook.com/ Android开发者支持:https://developers.facebook.com/docs/android/ 应用管理:htt ...
随机推荐
- eclipse 访问 hive1.2.1
参考链接1.http://www.iteblog.com/archives/846 操作实际参考代码:http://sunhs.sinaapp.com/?p=343 配置eclipse 搞1天, 不管 ...
- Android开发中常用的库总结(持续更新)
这篇文章用来收集Android开发中常用的库,都是实际使用过的.持续更新... 1.消息提示的小红点 微信,微博消息提示的小红点. 开源库地址:https://github.com/stefanjau ...
- C#特性文章学习
http://www.cnblogs.com/rohelm/archive/2012/04/19/2456088.html http://www.cnblogs.com/liuxinxin/artic ...
- ITIL也玩“太极拳”
近期看到一篇老外写的发布管理的培训材料,其中把发布管理比喻成中国太极图中的“阴”,把变 更管理比喻成“阳”,觉得还挺有意思.之所以这么比喻是因为,他认为“发布”是被动的,接受的,有女性阴柔的一面:而“ ...
- easyui datagrid 单元格编辑(cell editing)
demo中有row editing 项目中发现个cell editing,但是有bug,修改好了 主要实现功能:单击数据表格单元格,编辑单元格数据 js代码如下: $.extend($.fn.data ...
- Java实现窗体动态加载磁盘文件
在使用图形界面操作系统时,当打开一个文件夹系统会自动列出该文件夹下的所有文件及子文件夹.本实例实现了类似的功能:首先让用户选择一个文件夹,程序会动态列出该文件夹下的所有文件:如果该文件是隐藏文件,就在 ...
- mongodb 初学 索引
连接服务器异常(Connection refused) 啦啦啦 mongodb 搭建主从服务器 啦啦啦 Mongodb启动命令mongod参数说明 啦啦啦 MongoDB 分片 啦啦啦 啦啦啦 啦啦啦 ...
- MHL相关资源链接
http://www.mhlconsortium.org/ 消费者网站: www.meetmhl.com采用者网站:www.mhltech.org 博客http://blog.sina.com.cn/ ...
- N76E003之SPI
串行外围总线 (SPI)N76E003系列提供支持高速串行通信的SPI模块.SPI 为微控制与外设 EEPROM, LCD 驱动, D/A 转换之间提供全双工.高速.同步传输的总线.可提供主机从机模式 ...
- 使用js是想防止表单重复提交的效果
直接上代码: <html> <head> <title>Form表单</title> <script type="text/javasc ...