I just realised that I don’t get any more information about the expiration date of the access token. Precisely I’m talking about the facebook SDK for android where I call the authorize() method with a DialogListener callback as shown in the code below.
I haven’t looked at it for some weeks btu I know it was working before, now as I return to the project I find the call of facebook.getAccessExpires() returning 0 every time.
My first thought was the API might be broken and some changes applied I didn’t noticed. However using an iPhone project of about same age it seems to receive an expiration date. (From what I can see with my lack of objective-c skills ^^).
Next I checked out commit 5a72863793521a96f5a9f4fb72960a27b98e441d from facebook’s github ’cause I started to implemented supporting FB around this time and thought this way I might see if the SDK changed in some dramatic way.
So far all my efforts been in vain and I can’t think of a good reason where to track down this bug.
DialogListener dialogListener = new DialogListener(){
@Override
public void onComplete(Bundle values) {
mPrefsEdit.putString(USER_ACCESS_TOKEN, facebook.getAccessToken() )
.putLong(USER_ACCESS_EXPIR, facebook.getAccessExpires() )
.commit();
}
//other required overrides
}
Facebook facebook = new Facebook(APP_ID);
facebook.authorize(activity, APP_PERMISSIONS, Facebook.FORCE_DIALOG_AUTH, dialogListener);
facebook stop providing access of
offline access token permission. So access token will valid for very sort time (2-8 hour). See facebook blog for more details.This the main reason
facebook.getAccessExpires()always return 0.