Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8875177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:54:38+00:00 2026-06-14T18:54:38+00:00

I am experiencing some issues with the graph API on iOS. I am trying

  • 0

I am experiencing some issues with the graph API on iOS.
I am trying to fetch all FB albums from an user. I noticed that by default, the graph API answer 25 first elements and then they provide next and/or previous urls to query the rest.

My problem is that I need to query every elements (not only the first 25) in one shot.

I tried using the limit parameter as explained in Facebook documentation, but I get an empty data array in response. When I remove the limit param, I can grab the 25 first elements.
Facebook API behaves in a similar way when I try with until=today or until=yesterday.

Here is the url I am using:
https://graph.facebook.com/me/albums?limit=0
0 is supposed to means no limit, I tried with 99999 same results.

I was wondering if someone already has that strange behavior from the Graph API?

Thank you for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:54:39+00:00Added an answer on June 14, 2026 at 6:54 pm

    I finally found the problem.

    There is a bug in the social network, it seams that Apple always append the string "?access_token=[ACCESS_TOKEN]" at the end of the url string.

    According to that, if you put a parameter before in the URL string, the URL is not a valid as you’ll have two “?” in the string.

    To avoid that I am using NSURLConnection class to manage the connection in this way:

    NSString *appendChar = [[url absoluteString] rangeOfString:@"?"].location == NSNotFound ? @"?" : @"&";
    NSString *finalURL = [[url absoluteString] stringByAppendingFormat:@"%@access_token=%@", appendChar, self.facebookAccount.credential.oauthToken];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:finalURL]];
    NSURLResponse *response;
    NSError *error;
    NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
    
    if (error)
        [self.delegate facebookConnection:self didFailWithError:error];
    else
    {
        NSError *jsonError;
        NSDictionary *resultDictionnary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
    
        if (jsonError)
            [self.delegate facebookConnection:self didFailWithError:jsonError];
        else if ([resultDictionnary valueForKey:@"error"])
        {
            NSDictionary *errorDictionary = [resultDictionnary valueForKey:@"error"];
            NSError *facebookError = [NSError errorWithDomain:[errorDictionary valueForKey:@"message"] code:[[errorDictionary valueForKey:@"code"] integerValue] userInfo:nil];
            [self.delegate facebookConnection:self didFailWithError:facebookError];
        }
        else
            [self.delegate facebookConnection:self didFinishWithDictionary:resultDictionnary httpUrlResponse:response];
    }
    

    First I test the presence of the param character in the string and I append the correct one.
    I give you as a bonus the way I handle the error.

    I still use the social framework to get the credentials and connect the user:

        NSDictionary *accessParams = @{ACFacebookAppIdKey:kFacebookAppID, ACFacebookPermissionsKey:@[@"email", @"user_photos", @"user_activities", @"friends_photos"]};
    ACAccountStore *accountStore = [[ACAccountStore alloc] init];
    ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook];
    
    [accountStore requestAccessToAccountsWithType:accountType options:accessParams completion:^(BOOL granted, NSError *error)
     {
         if (granted)
         {
             NSArray *facebookAccounts = [accountStore accountsWithAccountType:accountType];
    
             if ([facebookAccounts count] > 0)
             {
                 self.facebookAccount = [facebookAccounts objectAtIndex:0];
                 self.accessToken = self.facebookAccount.credential.oauthToken;
                 [self.delegate facebookConnectionAccountHasBeenSettedUp:self];
             }
         }
         else
            [self.delegate facebookConnection:self didFailWithError:error];
     }];
    

    In this code I don’t handle multiple facebook accounts but you can easily transform that snippet to handle it in your own way. Also, the connection is sent synchronously because I am using GCD to avoid blocking my interface but you can implement an asynchronous method built in the NSURLConnection class.

    Hope this will help someone !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to debug some Redis issues I am experiencing and came by some
we have a customer that's been experiencing some blocking issues with our database application.
I am experiencing some really annoying issues with the PayPal Adaptive Payments API. I
I am experiencing several issues that I can't understand from the first glances. The
I've been experiencing some issues when trying to manually close a Word document created
I am experiencing some performance issues with the Magento API. Basically I use the
I am experiencing some very odd timing behavior from a function I wrote. If
I'm experiencing some problems while trying to read a binary file in C. This
After experiencing some performances issues on my client side, we decided to give a
We're currently experiencing issues with database locking using SQLite in a multi-user environment. These

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.