Facebook的SDK为Android - 第一次登录是很慢/需要很长的时间 [英] Facebook SDK for Android - first login is very slow / takes a very long time

查看:480
本文介绍了Facebook的SDK为Android - 第一次登录是很慢/需要很长的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Andr​​oid应用使用Facebook的SDK的v 3.01集成。
登录使用下面的一行:
  Session.openActiveSession(m_activity,真实,回调);

My Android app integrates with Facebook using the SDK v 3.01. Login using the line below: Session.openActiveSession(m_activity, true, callback);

用户试图通过应用程序登录Facebook的第一次,需要花费很长的时间去那里的用户有望进入输入(用户名/密码)的地步。我有分寸的一分多钟的情况,但约30秒的正常。

The first time a user tries to login to Facebook through the app, it takes a REALLY long time to get to the point where the user is expected to enter input (username / pass). I have measured cases of over a minute, but ~30 seconds is "normal".

这99%的时间只是在等待Facebook的SDK打开Facebook登录页面。用户将看到一个空的屏幕,上面有我的应用程序名称标题栏,并在中心的进度条转动,转动......

99% of this time is just waiting for the Facebook SDK to open the Facebook login page. User sees an empty screen with a title bar with my application name on it, and in the center a progress bar turning and turning...

要重现:


  • 我的应用程序清除数据

  • 的Facebook应用程序清除数据

  • 运行我的应用程序,并执行code以上的就行了。

顺便说一句,在登录过程(如果你能抽出时间),最终的作品出来,以后登录非常快。但是,大多数用户只是不与进度条获得白色屏幕并点击后退,因此从未登录与Facebook。

By the way, the login process (if you can spare the time) eventually works out, and future logins are very quick. But most users just don't get the white screen with the progress bar and hit 'back', hence never logging in with Facebook.

我已经想到了下面的选项,并排除出来:
  - 实现自己的登录使用OAuth:排除了,因为我觉得FB会通过他们的API来删除登录不支持
  - 执行此过程在后台,只弹出登录活动时,它的读:排除,因为我不认为这是可能的...
  - 改变code:排除了,因为我无法找到......伐木的'好'的方式

I have thought of the following options and ruled them out: - Implement my own login using OAuth: Ruled out because I think FB is going to remove support for login not through their API - Do this process in the background and only popup the login activity when it's 'read': Ruled out because I don't think it's possible... - Change the code: Ruled out because I couldn't find a 'better' way of logging in...

我的猜测是,要么我做错了什么,或有至少有一个聪明的人,在那里,想出解决的办法。

My guess is that either I'm doing something wrong, or there's at least one smart person out there that figured out a way around this.

鸭preciate你们的帮助和富有成效的讨论。

Appreciate your help and a productive discussion.

推荐答案

Facebook的登录添加到您的应用程序最简单的方法是添加 LoginButton 从的 Facebook的SDK

The simplest way to add Facebook Login to your app is to add LoginButton from the Facebook sdk

这篇关于Facebook的SDK为Android - 第一次登录是很慢/需要很长的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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