Hi,
I am using iOS SLRequest to access twitter streaming api.
My code is
ACAccount *twitterAccount = [twitterAccounts firstObject];
NSURL *requestURL = [NSURL URLWithString:@"https://stream.twitter.com/1.1/statuses/filter.json"];
NSMutableDictionary *parameters =
[[NSMutableDictionary alloc] init];
[parameters setObject:@"twitter" forKey:@"track"];
SLRequest *postRequest = [SLRequest
requestForServiceType:SLServiceTypeTwitter
requestMethod:SLRequestMethodPOST
URL:requestURL parameters:parameters];
postRequest.account = twitterAccount;
dispatch_async(dispatch_get_main_queue(), ^{
self.aconn = [NSURLConnection connectionWithRequest:[postRequest preparedURLRequest] delegate:self];
[self.aconn start];
});
}
I am getting following error
HTTP ERROR: 401
Problem accessing '/1.1/statuses/filter.json'. Reason:
Unauthorized
Has anyone got & fixed similar problem ?
Thanks,
Pavan