Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed date/time for token expiry

  • Loading branch information...
commit 4791945baf5866aa9140fe6226c167a850e3fd7e 1 parent 8389cc4
@zachgraves zachgraves authored
View
4 Source/YOSSocial/YOSAccessToken.m
@@ -28,8 +28,8 @@ + (YOSAccessToken *)tokenFromResponse:(NSData *)responseData
{
NSDictionary *tokenDictionary = [responseData OAuthTokenResponse];
- NSInteger tokenExpires = [[tokenDictionary valueForKey:@"oauth_expires_in"] intValue] + time(NULL);
- NSInteger authExpires = [[tokenDictionary valueForKey:@"oauth_authorization_expires_in"] intValue] + time(NULL);
+ NSInteger tokenExpires = [[tokenDictionary valueForKey:@"oauth_expires_in"] intValue];
+ NSInteger authExpires = [[tokenDictionary valueForKey:@"oauth_authorization_expires_in"] intValue];
YOSAccessToken *theToken = [[YOSAccessToken alloc] initWithKey:[tokenDictionary valueForKey:@"oauth_token"]
andSecret:[tokenDictionary valueForKey:@"oauth_token_secret"]];
View
2  Source/YOSSocial/YOSRequestToken.m
@@ -26,7 +26,7 @@ + (YOSRequestToken *)tokenFromResponse:(NSData *)responseData
NSDictionary *tokenDictionary = [responseData OAuthTokenResponse];
BOOL isCallbackConfirmed = [[tokenDictionary valueForKey:@"oauth_callback_confirmed"] isEqualToString:@"true"];
- NSInteger tokenExpires = [[tokenDictionary valueForKey:@"oauth_expires_in"] intValue] + time(NULL);
+ NSInteger tokenExpires = [[tokenDictionary valueForKey:@"oauth_expires_in"] intValue];
YOSRequestToken *theToken = [[YOSRequestToken alloc] initWithKey:[tokenDictionary valueForKey:@"oauth_token"]
andSecret:[tokenDictionary valueForKey:@"oauth_token_secret"]];
Please sign in to comment.
Something went wrong with that request. Please try again.