STTwitter CFNetwork internal error NSURLRequest

陌路散爱 提交于 2019-12-10 14:25:56

问题


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?


回答1:


I think I found the issue.

iOS 8 raises a runtime warning when setting -[NSURLRequest HTTPMethod] to nil.

I updated STHTTPRequest and STTwitter.

Let me know if it works for you.



来源:https://stackoverflow.com/questions/24223542/sttwitter-cfnetwork-internal-error-nsurlrequest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!