After looking at this link API mode error I corrected some code using STTwitter. This eradicated one error but made me notice a new CFNetwork error. Whenever I try to fetch statuses using either getHomeTimelineSinceID or getUserTimelinewithScreenName, the error "CFNetwork internal error (0xc01a:/SourceCache/CFNetwork/CFNetwork-695.1.5/Foundation/NSURLRequest.mm:798)" pops up in the debugger. After debugging I found the error pops right after [r Asynchronous] (line 272 of STTwitterAppOnly.m). I got to this spot by stepping into verifyCredentialsWithSuccessBlock.
The code I am currently using:
[twitter verifyCredentialsWithSuccessBlock:^(NSString *bearerToken) {
[twitter getHomeTimelineSinceID:nil
count:20
successBlock:^(NSArray *statuses) {
NSLog(@"-- statuses: %@", statuses);
self.twitterFeed = statuses;
[self.tableView reloadData];
} errorBlock:^(NSError *error) {
}];
And I have also tried:
[twitter getUserTimelineWithScreenName:@"Dandelion_2014"
successBlock:^(NSArray *statuses) {
self.twitterFeed = [NSMutableArray arrayWithArray:statuses];
[self.tableView reloadData];
} errorBlock:^(NSError *error) {
NSLog(@"%@", error.debugDescription);
}];
I'm not sure what is causing this error, does anybody have insight?
[setHTTPMethod]
is obsolete in iOS 8 (I am using the beta). I ran the same code on an older device using iOS 7.1 and the error did not come up. However, neither did a tableview of twitter feed entries. Going to keep looking. – Mixon