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

  • SEARCH
  • Home
  • 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 6534087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:12:32+00:00 2026-05-25T10:12:32+00:00

I’ve been trying to access previous statuses posted by current user (the one that

  • 0

I’ve been trying to access previous statuses posted by current user (the one that logs in). It seems to be unreliable and the number of statuses returned seems to vary.

I understand that you can use ?limit=, ?since= and ?until=, however when I use ?limit=1000 thats say large enough to get some of the earlier posts made by the user it becomes unpredictable.

What I want to be able to do is access the first few statuses I’ve posted since I joined Facebook. What would the best way to do this? (Using ‘?limit=1000’ seems a bit excessive!)

This sets permissions etc and then grabs the feed:

require 'php-sdk/src/facebook.php';

$facebook = new Facebook(array(
  'appId'  => 'xxxxxxxx',
  'secret' => 'xxxxxxxxxxxxxxxxxxxx', 
  'cookie' => true
));

$user = $facebook->getUser();

// Permissions required
$par = array();
$par['scope'] = "status_update user_about_me user_status";

$feed = null;
$profile = null;
$loginUrl = null;

if ($user) {
    $logoutUrl = $facebook->getLogoutUrl();
    try {
        // Proceed knowing you have a user who is logged in and authenticated

        // Get Feed
        $feed = $facebook->api('/me/feed');
        // Get User Profile
        $profile = $facebook->api('/me');
    } catch (FacebookApiException $e) {
        error_log($e);
        $user = null;
    }   
} 
else {
    $loginUrl = $facebook->getLoginUrl($par);
}

?>

This is what I’m using to display the statuses updates from the feed:

foreach ($feed['data'] as $entry)
{
    // If its a message posted by user
    $isStatusUpdate = array_key_exists('message', $entry) and $entry['from']['name'] == $profile['name'];

    if ($isStatusUpdate)
    {
        $likes = 0;
        $comment = 0;

        // Get num of likes 
        if (array_key_exists('likes', $entry))
            $likes = count($entry['likes']); 

        // Get num of comments
        if (array_key_exists('comments', $entry))
            $comments = count($entry['comments']);

        // Display message with num of likes and comments
        echo '<div class="row"><div class="span4 columns"><h2>Post '.$counter.'</h2>';
        echo '<p>Likes '.$likes.'</br>';
        echo 'Comments '.$comments.'</p></div>';
        echo '<div class="span12 columns"><h3>'.substr($entry['created_time'], 0, 10).'</h3>';
        echo '<pre class="prettyprint">'.$entry['message'].'</pre></div>';
    }
}
  • 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-05-25T10:12:32+00:00Added an answer on May 25, 2026 at 10:12 am

    You can not do limit=1000, and I’m not surprised you are getting unexpected results. There is an upper limit to how many you can request at one time, even if there was not you would more then likely get a timeout and only receive partial data.

    What you could do however is send a request that uses a ‘since’ field that is forever ago in the past so that is certainly before the user became a facebook member. For instance if you were to use a since date of 1/1/2000 you would get a list of posts from the first one the user made forward.

    Hope that helps

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I need to clean up various Word 'smart' characters in user input, including but

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.