Created
July 23, 2010 00:31
-
-
Save joepestro/486845 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example using the ASIHTTPRequest library | |
// http://allseeing-i.com/ASIHTTPRequest/ | |
- (IBAction)checkIn:(id)sender { | |
NSURL* url = [NSURL URLWithString:@"https://api.fanvibe.com/v1/checkin"]; | |
ASIFormDataRequest* request = [[[ASIFormDataRequest alloc] initWithURL:url] autorelease]; | |
[request setDelegate:self]; | |
[request setRequestMethod:@"POST"]; | |
[request setPostValue:@"107763" forKey:@"game_id"]; | |
[request setPostValue:@"YOUR_ACCESS_TOKEN" forKey:@"access_token"]; | |
[request setDidFailSelector:@selector(requestFailed:)]; | |
[request setTimeOutSeconds:10]; | |
[request startAsynchronous]; | |
} | |
- (void)requestFinished:(ASIHTTPRequest*)request { | |
NSString* responseString = [request responseString]; | |
} | |
- (void)requestFailed:(ASIHTTPRequest*)request { | |
NSError* error = [request error]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment