thebergamo / react-native-fbsdk-next

MIT License
633 stars 165 forks source link

Wrong expiration time for access token recieved , #480

Closed Commaando closed 4 months ago

Commaando commented 4 months ago

I have integrated fbsdk next in app. when user asks token for access token with

await AccessToken.getCurrentAccessToken()

then i get response: 
 {"accessToken": "-- some access token --", "accessTokenSource": undefined, "applicationID": "--some application id--", "dataAccessExpirationTime": 64092211200000, "declinedPermissions": [], "expirationTime": 64092211200000, "expiredPermissions": [], "lastRefreshTime": 1702035095333.407, "permissions": ["public_profile", "openid", "email"], "userID": "--some user id --"}

my query is this : dataAccessExpirationTime and expirationTime comes in a format i could not identify . in unix milliseconds it returns some date in year 4042 which is not possible , i could not find any documentation on whats the unit here to be precise.

can anyone help me to parse expiration token time .

this occured in both environment

mikehardy commented 4 months ago

you'll need to ask this upstream for the platform you want to pursue first (facebook-ios-sdk or facebook-android-sdk, both on github) or ask on stackoverflow

You'll want to do a better job specifying versions etc though or no one will be able to help https://stackoverflow.com/help/how-to-ask

Commaando commented 4 months ago

I've noticed an issue on both Android and iOS with version 11.1.0. Regarding the expiration time unit, it doesn't seem to be a Unix timestamp. Can you provide more details on the format or unit used for expiration time in this version? Thanks!