Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
- <error>
- <status>401</status>
- <timestamp>1349234286875</timestamp>
- <request-id>ZAAVLR7K6H</request-id>
- <error-code>0</error-code>
- <message>[unauthorized]. OAUxxxxxxxx-xxxxxxxx|*xx|*xx:xxxxxxxx:lxxxxxxxxxxxxxxxx=</message>
- </error>
- http://api.linkedin.com/v1/people/~/shares
- POST&http%3A%2F%2Fapi.linkedin.com%2Fv1%2Fpeople%2F~%2Fshares&oauth_consumer_key%3Diws9c2xtzgdr%26oauth_nonce%xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1349234713%26oauth_token%xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx%26oauth_version%3D1.0
- - (void) updateStatus : (NSString *) status{
- if (self.consumer != nil) {
- OAMutableURLRequest *request =
- [[OAMutableURLRequest alloc] initWithURL: requestURL
- consumer: self.consumer
- token: self.accessToken
- callback: nil
- signatureProvider: nil];
- NSMutableDictionary *permsDict = [NSMutableDictionary dictionary];
- [permsDict setValue: @"anyone" forKey: @"code"];
- NSMutableDictionary *shareJSONDict = [NSMutableDictionary dictionary];
- [shareJSONDict setValue: permsDict forKey: @"visibility"];
- [shareJSONDict setValue: @"test" forKey: @"comment"];
- [request setValue:@"application/json" forHTTPHeaderField:@"x-li-format"];
- NSString *updateString = [shareJSONDict JSONString];
- [request setHTTPBodyWithString:updateString];
- [request setHTTPMethod:@"POST"];
- OADataFetcher *fetcher = [[OADataFetcher alloc] init];
- [fetcher fetchDataWithRequest: request
- delegate: self.sessionDelegate
- didFinishSelector: @selector(postUpdateApiCallResult:didFinish:)
- didFailSelector: @selector(postUpdateApiCallResult:didFail:)];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement