Skip to content
Browse files

fixed date/time for token expiry

  • Loading branch information...
1 parent 8389cc4 commit 4791945baf5866aa9140fe6226c167a850e3fd7e @zagraves zagraves committed Aug 11, 2009
Showing with 3 additions and 3 deletions.
  1. +2 −2 Source/YOSSocial/YOSAccessToken.m
  2. +1 −1 Source/YOSSocial/YOSRequestToken.m
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"]];

0 comments on commit 4791945

Please sign in to comment.
Something went wrong with that request. Please try again.