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 6553365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:34:23+00:00 2026-05-25T12:34:23+00:00

The output can be seen here: http://4playtheband.co.uk/twitter/example.php An example post is : Array (

  • 0

The output can be seen here: http://4playtheband.co.uk/twitter/example.php

An example post is :

Array
(
    [data] => Array
    (
        [0] => Array
            (
                [id] => 100001172604294_157498814333844
                [from] => Array
                    (
                        [name] => Martin Carlin
                        [id] => 100001172604294
                    )

                [picture] => http://platform.ak.fbcdn.net/www/app_full_proxy.php?app=291549705119&v=1&size=z&cksum=c37c749664ac69ae07a1f0ffcd1348e5&src=http%3A%2F%2Fcityvillefb2.static.zgncdn.com%2Fhashed%2F33a4a96920be7e6e3aeefe90b0915d1a.png
                [link] => http://apps.facebook.com/cityville/Reward.php?frHost=31058426480&frId=637143ed6a1be4e9ca42d9a5bd444066&frType=municipal_material_checkerflag&sendKey=bfdfe9442a98ce31102cf6f2eff52a2a%24%24ccF%28NVPZ%2A4jCM0YUzNKZxMdo6KHTAgZEZnQs5qUewzHYkAPHFoaJRaDyAG%29P9zeEXyVBDlaqIH7JYL%28wITH4BTXkXFfU3C9%28Ht&sig=8a0b72d997dc15d8fa76dbb9a627b55d&sendkey=bfdfe9442a98ce31102cf6f2eff52a2a%24%24ccF%28NVPZ%2A4jCM0YUzNKZxMdo6KHTAgZEZnQs5qUewzHYkAPHFoaJRaDyAG%29P9zeEXyVBDlaqIH7JYL%28wITH4BTXkXFfU3C9%28Ht
                [name] => Martin has an extra Checker Flag to help finish your Go Karts!
                [description] => Martin is working hard to build a new Go Karts in CityVille and could use your help. You'll earn bonus Coins for lending a hand, too!
                [icon] => http://photos-f.ak.fbcdn.net/photos-ak-snc1/v27562/71/291549705119/app_2_291549705119_3378.gif
                [actions] => Array
                    (
                        [0] => Array
                            (
                                [name] => Send Checker Flag,...
                                [link] => http://apps.facebook.com/cityville/Reward.php?frHost=31058426480&frId=637143ed6a1be4e9ca42d9a5bd444066&frType=municipal_material_checkerflag&sendKey=bfdfe9442a98ce31102cf6f2eff52a2a%24%24ccF%28NVPZ%2A4jCM0YUzNKZxMdo6KHTAgZEZnQs5qUewzHYkAPHFoaJRaDyAG%29P9zeEXyVBDlaqIH7JYL%28wITH4BTXkXFfU3C9%28Ht&sig=8a0b72d997dc15d8fa76dbb9a627b55d&sendkey=bfdfe9442a98ce31102cf6f2eff52a2a%24%24ccF%28NVPZ%2A4jCM0YUzNKZxMdo6KHTAgZEZnQs5qUewzHYkAPHFoaJRaDyAG%29P9zeEXyVBDlaqIH7JYL%28wITH4BTXkXFfU3C9%28Ht
                            )

                    )

                [type] => link
                [application] => Array
                    (
                        [name] => CityVille
                        [id] => 291549705119
                    )

                [created_time] => 2011-09-07T08:30:54+0000
                [updated_time] => 2011-09-07T08:30:54+0000
                [comments] => Array
                    (
                        [count] => 0
                    )

            )

        [1] => Array
            ( // etc

What I’m thinking of is perhaps just printing out the first 10 of these posts. I have a lot of crappy cityville things on my feed just now as you can see but eventually this will be used for an actual company page so I’m not sure ‘normal’ statuses still have as many elements to them?

Also, is there a way to set a limit on how many I can retrieve – no point in Facebook deciding only to give me 25 when I only want the 10 most recent, code below:

<?php        

include_once "src/facebook.php";

$appId = '11111111111';   
$secret = '1111111111';

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

//Facebook Authentication part

$user       = $facebook->getUser();

$loginUrl   = $facebook->getLoginUrl(
    array(
        'canvas'    => 1,
        'fbconnect' => 0,
        'scope'         => 'user_status,publish_stream,user_photos'
    )
);

if ($user) {
  try {

    //$user_profile = $facebook->api('/me');
    $user_feed = $facebook->api('/me/feed');
    //$user_home = $facebook->api('/me/home');

    echo $user_profile['name'];

    echo "<pre>";
    //print_r ($user_profile);
    print_r ($user_feed);
    //print_r ($user_home);
    echo "</pre>";

  } catch (FacebookApiException $e) {
    $user = null;
  }
}

if (!$user) {
     echo "<script type='text/javascript'>top.location.href = '$loginUrl';</script>";
     exit;
}
?>

Any help is much appreciated, I’m not very experienced with complicated Arrays such as this one and somebody out there will more than likely have had to format this themselves I’m sure.

Thanks,

UPDATE

Thanks for the helpful answers so far but I’ve just noticed that comments and likes are included in the array once they are made and was wondering on how to pull these aswell, only trouble being is they are in yet another array nested within the overall structure of the post.

[0] => Array
    (
        [id] => 100001172604294_225960714119680
        [from] => Array
            (
                [name] => Martin Carlin
                [id] => 100001172604294
            )

        [message] => need to post something to see if this thing I'm trying to make work will pick it up. Apologies it's not entertaining, the odds will get better as the day goes on (probably).
        [comments] => Array
            (
                [data] => Array
                    (
                        [0] => Array
                            (
                                [id] => 100001172604294_225960714119680_2800008
                                [from] => Array
                                    (
                                        [name] => xxxxxxx
                                        [id] => 11111111
                                    )

                                 [message] => worst comment ever!
                                 [created_time] => 2011-09-07T09:10:49+0000
                                 [likes] => 1
                             )

                         )

                     [count] => 1
                )

            )`
  • 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-25T12:34:24+00:00Added an answer on May 25, 2026 at 12:34 pm

    If you only want the first 10, you could do something like this

    for ($i=0; $i<10, $i++) {
         // print the naem of the poster
         echo "posted by: ".$user_feed['data'][$i]['from']['name']."<br>";
         // print description of every post ...
         echo $user_feed['data'][$i]['description'];
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataSet consisting of XML data, I can easily output this to
Ok, this is rather simple, but from what I've seen… you can only use
I can output a locale sensitive time format using strftime('%X') , but this always
How can I output all of the text in a node, including the text
How can the output rate be higher than hard disk write rate? Update 1
How can I output colored text using printf on both Mac OS X and
how can I output text to the console without new line at the end?
can we output a .jpg image or .gif image in C? I mean can
in what way can I output the reference of an object in memory. Like:
I've noticed that the wmd editor can either output HTML or markdown. Does it

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.