The new Facebook SDK for Android (3.0) has deprecated a lot of the old methods, including the setAccessToken method. The replacement for this (I think) is the method openWithImportedAccessToken
Does anyone have any examples of using this? In particular how do you get the expiration time and last refresh time of the access token?
If you have no data for a particular parameter, there are reasonable defaults you can fill in here that result in sub-optimal-but-not-too-bad behavior.
Keep in mind that you should only be calling this API the first time you run after upgrading to the 3.x Android SDK to import the token from wherever you were storing it before. Afterwards, the SDK manages the token cache by default. So any sub-optimal behavior should be one-time localized to this upgrade.
Provide what data you know. For what you don't know, it is mostly okay to specify that:
Note that if you always ask for the same permissions and therefore know what permissions your old token has, use those.
It is better if you can provide the correct values for these parameters, but the downsides are generally not terrible. Here are the downsides to lying to this API:
Our documentation here tells you how to to retrieve/debug the access token to retrieve metadata such as the expiration and when it was issued. You can use this endpoint if you do not those fields beforehand.