Search in sources :

Example 1 with AccessTokenSource

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);
}
Also used : AccessTokenSource(com.facebook.AccessTokenSource) AccessToken(com.facebook.AccessToken) Date(java.util.Date)

Aggregations

AccessToken (com.facebook.AccessToken)1 AccessTokenSource (com.facebook.AccessTokenSource)1 Date (java.util.Date)1