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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:40:06+00:00 2026-05-27T17:40:06+00:00

I have the read feed working and get back everything I should and it

  • 0

I have the read feed working and get back everything I should and it looks like the array listed below:

My problem is that I want to retrieve the individual message. I’ve tried:

// what I think should work - fails
$msgData = $facebook->api("/$fb_id/posts/$msgToken", 'GET', $parameters);

// link in msg (below) but fb gives "unknown browser" error message
$msgData = file_get_contents("http://www.facebook.com/$fb_id/posts/$msgToken");

// as per fb docs but this fails too...
$msgData = file_get_contents("https://graph.facebook.com/$msgToken");

So, what’s the real way to get just one message when you know that messages ID?

[0] => Array
    (
        [id] => 100002222222222_209088888888888
        [from] => Array
            (
                [name] => My dog
                [id] => 100002222222222
            )

        [message] => this is a test msg...
        [picture] => http://platform.ak.fbcdn.net/www/app_full_proxy.php?app=999999999999999...
        [link] => http://www.domain.com/
        [name] => Application Name
         => Caption of for this post
        [description] => A description of this post
        [icon] => http://www.facebook.com/images/icons/default_app_icon.gif
        [actions] => Array
            (
                [0] => Array
                    (
                        [name] => Comment
                        [link] => http://www.facebook.com/100002222222222/posts/209088888888888
                    )

                [1] => Array
                    (
                        [name] => Like
                        [link] => http://www.facebook.com/100002222222222/posts/209088888888888
                    )

            )

        [privacy] => Array
            (
                [description] => Friends
                [value] => ALL_FRIENDS
                [allow] => 0
                [deny] => 0
            )
    )
  • 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-27T17:40:06+00:00Added an answer on May 27, 2026 at 5:40 pm

    You can access single post by post id which is 100002222222222_209088888888888 in sample provided by you. (post id is "{$user_id}_${message_id}")

    To to so you need also active access_token. If you using Facebook PHP-SDK it will use Logged-In user access_token (if you logged in to Facebook and user FB.login or Facebook::getLoginUrl)

    $post_id = '100002222222222_209088888888888';
    $msgData = $facebook->api("/{$post_id}");
    

    otherwise you’ll need to provide one manually:

    $post_id = '100002222222222_209088888888888';
    $access_token = "APPLICATION_OR_USER_ACCESS_TOKEN";
    
    // Using Facebook PHP-SDK
    $parameters = array('access_token'=>$access_token);
    $msgData = $facebook->api("/{$post_id}", 'GET', $parameters);
    
    // OR
    
    // Using file_get_contents
    $url = "https://graph.facebook.com/{$post_id}?access_token={$access_token}";
    $msgData = file_get_contents($url);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read that I can use the gmail atom feed to get mails
I am working on a mobile application and have to read a xml feed
I recall I have read about a parser which you just have to feed
I have read a lot that LISP can redefine syntax on the fly, presumably
I have read that using database keys in a URL is a bad thing
I have read on Stack Overflow some people that have converting to C#2.0 to
I have read (or perhaps heard from a colleague) that in .NET, TransactionScope can
I have a userscript (read: my Javascript on someone else's site) that allows users
I have to read a txt file with lines formated like this: 1: (G,
I write code given below to read Atom feed. string strUrL = http://loluyede.blogspot.com/atom.xml; WebRequest

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.