English 中文(简体)
访问- token 过期后重新认证用户
原标题:Re-authenticating users after access_token expires

我需要迁移我的 FB 应用程序, 使其不用使用 < code> offline_ access 权限 。 据我理解, 服务器端 OAUT 一旦用户认证后, 服务器端 OAUT 应该返回一个长寿命( 60天) < code> access_ token

这60天结束后,我必须申请一个新的标记。 但是,我能否在不要求用户重新访问脸书的情况下透明地做到这一点? 我知道用户不会因为同样的许可而被催促,但是:

a) redirect_uri 参数必须指向一个能处理 OAUT 请求的 URL 的 URL 参数,这使透明操作难以操作

(b) 我的许多图表API电话都是从AJAX公司请求击中我的服务器中启动的。如果这些电话因过期的牌子被拒绝,我无法在不中断程序流的情况下将用户调离。

所以,我的问题是,这能否以完全透明的方式完成?我认为答案是每60天对用户进行监听 — — 特别是如果他们在59天里一直定期使用应用程序 — — 似乎超员。

最佳回答

看起来答案确实像是"不"... 在下"https:// developmenters.facebook.com/romemap/offline-access-remotion/"rel="nofollow" >Scenario 3

Note: The user must access your application before you re able to get a valid "authorization Code" to be able to make the server-side OAuth call again. Apps will not be able to setup a background/cron job that tries to automatically extend the expiration time, because the "authorization code" is short-lived and will have expired.

我们面临同样的问题,看起来我们被迫每隔60天就对用户进行监听。幸好这是我们系统的一个“相对的”小部分,所有AJAX的电话都打到我们的服务器上,而服务器又转而拨打查询 fb - 所以我们在那里有一层抽象的层, 我们可以把缓存的数据/控制信息往回传递, 来管理应用程序的流, 这使得我们有一些松动的空间, 在等待数据储存并适当调整用户方向之前, 轻轻地失败。

顺便提一下,值得指出的是,根据rmap offline_access ,2012年10月3日将正式被废除。

问题回答

暂无回答




相关问题
How do i redirect to a GET request from a POST request on GAE

i am writing an FBML app on facebook hosted in GAE. Facebook will talk to your hosted app only vai POST (im sure this is the cause, but please do correct me if i m wrong). So im faced with the issue ...

Facebook Graph API: user gender

The old Facebook API provided the user sex/gender as part of the default user data. Apparently the new Graph API does not provide that information, even though the documentation says that it does. I ...

Send private messages to friends

I need to get via Facebook connect user s info and send a private message to all of his friends. Is it possible?

Facebook Canvas multiple pages?

Is it not possible to move between pages in the canvas on facebook? I m trying to create a app where i have two pages that the users can switch between. The first page works fine, but when i click a ...

Getting a friend count from Facebook (possibly using api)

I m used to working with Twitter, where friend/follower totals are available in a simple XML request. My goal is a simple "enter your username/user id, and display your friends count". Is there ...

热门标签