Facebook iOS SDK: refreshing an expired access token without presenting a dialog?

A recent commit in the Facebook iOS SDK project included an "extend access token" method for extending an expired token.

Up vote 4 down vote favorite 1 share g+ share fb share tw.

I'm using the Facebook iOS SDK. In my code I have authorized my app with the default permissions, so my session is valid until the expiration date is reached. However, after the expiration date is reached, I attempt to reauthorize in order to "refresh my OAuth token", as asked before.

However, when I attempt to reauthorize, it displays a dialog saying I have already authorized my app, even though I expect it to just update my OAuth token without a dialog. According to facebook, this is possible: When you redirect the user to the auth dialog, the user is not prompted for permissions if the user has already authorized your application. Facebook will return you a valid access token without any user facing dialog.

However, I do get a dialog and I'd like to know how I can refresh the access token without getting the dialog. Ios facebook sdk oauth link|improve this question edited Dec 4 '11 at 21:09Tamás8,69511638 asked Dec 4 '11 at 4:56augusto callejas457.

I'm facing the same issue too.. let me know if you figure it out – Lance Dec 15 '11 at 3:15 I believe that the behavior Facebook describes in the post you linked to only works for web apps. – Ole Begemann Dec 22 '11 at 8:22.

A recent commit in the Facebook iOS SDK project included an "extend access token" method for extending an expired token. More information about this and the deprecation of "offline_access" is in Facebook Developer's blog post.

A possible work around is to request offline_access as a permission. Then the access token only expires when: The user logs out of facebook Changes their password Revokes permissions for your app via the facebook website If anyone has a better answer id like to know too. Requesting offline access for my app could look a bit suspicious (even though the only reason I need it is for non-expiring access token, I won't actually be accessing a users account when their not using my app).

Offline_access is now deprecated, unfortunately. – Chris Nolet Mar 12 at 3:55.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions