Skip to content

Error code 204 - "The request did not return any content." #133

Description

@AnjaliJariwala

When I tried to fetch followers, Mostly time FHSTwitterEngine returns error like

Error Domain=FHSErrorDomain Code=204 "The request did not return any content." UserInfo={NSLocalizedDescription=The request did not return any content.}

Here is my code..
`- (void)getFollowersWithCursor:(NSString *)strCursor {
NSString *username = [FHSTwitterEngine sharedEngine].authenticatedUsername;
NSMutableDictionary * dict1 = [[FHSTwitterEngine sharedEngine] listFollowersForUser:username isID:NO withCursor:strCursor];
if ([dict1 isKindOfClass:[NSError class]])
{
NSLog(@"%@", dict1);
if(_arrFollowers.count > 0)
{
//Pass followers list to display on screen
}
else
{
[SVProgressHUD showErrorWithStatus:@"There was problem while fetching your followers."];
}
}
else
{
NSMutableArray *array=[dict1 objectForKey:@"users"];
if (array.count > 0) {

           //Do next steps as per my requirements
            if ([[dict1 objectForKey:@"next_cursor_str"] isEqualToString:@"0"]) {
               //Pass followers list to display on screen
             }
            else
            {
                [self getFollowersWithCursor:[dict1 objectForKey:@"next_cursor_str"]];
            }
            
        }
    }

}`

Is there any solution which resolve this problem. I am currently run code on iOS 11.2 version
Thanks in advance :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions