Was läuft falsch beim Zugriff auf das Twitter-Timeline-Konto?
Ich habe den folgenden Code ausprobiert, um auf die Twitter-Timeline zuzugreifen. Es wurden keine Daten vom Server empfangen. Was ist hier falsch gelaufen?
ACAccount *twitterAccount=[arrayOfAccounts lastObject];
NSURL *requestURL=[NSURL URLWithString:@"http://api.twitter.com/1/statuses/user_timeline.json"];
NSMutableDictionary *parameters=[NSMutableDictionary new];
//[parameters setObject:@"100" forKey:@"count"];
//[parameters setObject:@"1" forKey:@"include_entities"];
SLRequest *post=[SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodGET URL:requestURL parameters:parameters];
post.account=twitterAccount;
[post performRequestWithHandler:^(NSData *response, NSHTTPURLResponse *urlResponse, NSError *error) {
self.array=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableLeaves error:&error];
if(self.array.count !=0)
NSLog(@"%@",self.array);
else
NSLog(@"No Data Recived");
Danke im Voraus.