use of com.facebook.AccessTokenSource in project react-native-fbsdk by facebook.
the class Utility method buildAccessToken.
public static AccessToken buildAccessToken(ReadableMap accessTokenMap) {
AccessTokenSource accessTokenSource = AccessTokenSource.valueOf(accessTokenMap.getString("accessTokenSource"));
Date expirationTime = new Date((long) accessTokenMap.getDouble("expirationTime"));
Date lastRefreshTime = new Date((long) accessTokenMap.getDouble("lastRefreshTime"));
return new AccessToken(accessTokenMap.getString("accessToken"), accessTokenMap.getString("applicationID"), accessTokenMap.getString("userID"), reactArrayToStringList(accessTokenMap.getArray("permissions")), reactArrayToStringList(accessTokenMap.getArray("declinedPermissions")), accessTokenSource, expirationTime, lastRefreshTime);
}
Aggregations