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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:32:51+00:00 2026-06-11T14:32:51+00:00

I need a little help with getting some JSON out of facebook, basically all

  • 0

I need a little help with getting some JSON out of facebook, basically all I need to do is get the status text and post it to a website.

I’m using the method below, but the access_tokens with this method expires every hour.

$.getJSON('https://graph.facebook.com/SOME_ID?fields=statuses.limit(10).fields(message)&access_token=SOME_ACCESS_TOKEN', function(data) {});

Note that i got the URL above from facebook graph API explorer.

any other way to achieve what I am trying to do?

update:

I used FB.api, but i’m not sure if I’ve done it correctly as it is sending me this error
“An access token is required to request this resource.”

window.fbAsyncInit = function() {
    FB.init({
      appId      : 'My_app_id', // App ID
      channelUrl : '//myHost.com/facebook/channel.php', // Channel File
      status     : true, // check login status
      cookie     : true, // enable cookies to allow the server to access the session
      xfbml      : true  // parse XFBML
    });

    FB.api('USER_ID?fields=statuses.fields(message)', function(response) {
      console.log(response);
    });
    // Additional initialization code here
  };

  // Load the SDK Asynchronously
  (function(d){
     var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
     if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/en_US/all.js";
     ref.parentNode.insertBefore(js, ref);
   }(document));

Note that i replaced (my_app_id, myHost.com and USER_ID) with the right values.

thanks in advance.

  • 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-11T14:32:52+00:00Added an answer on June 11, 2026 at 2:32 pm

    The user needs to be logged in to Facebook and allow your app before you can call the API, update your code to this:

    window.fbAsyncInit = function() {
        FB.init({
          appId      : 'My_app_id', // App ID
          channelUrl : '//myHost.com/facebook/channel.php', // Channel File
          status     : true, // check login status
          cookie     : true, // enable cookies to allow the server to access the session
          xfbml      : true  // parse XFBML
        });
    
        FB.getLoginStatus(function(response) {
            if (response.status === 'connected') {
                FB.api('USER_ID?fields=statuses.fields(message)', function(response) {
                  console.log(response);
                });
            }
        });
      };
    

    More information on the getLoginStatus status: http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/

    You will also need to also need to ask the permission user_status see the doc for more details: https://developers.facebook.com/docs/authentication/permissions/

    You should ask for permissions when calling FB.login:

     FB.login(function(response) {
       // handle the response
     }, {scope: 'user_status'});
    

    https://developers.facebook.com/docs/reference/javascript/FB.login/

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

Sidebar

Related Questions

I need a little help getting a tar file to download from a website.
Hey all i am in need of a little help with figuring out how
I am getting a little tricked up right now so I need some help.
I am getting a little confused and need some help please. Take these two
I need a little help getting this script doing what I want it to.
I need little help for url rewriting in wordpress. basically what i need: mydomain.com/mysomewordpresspost
I would need little help here. I'm trying to get the git respository from
Need a little help with my jquery here I want all my button with
I need a little help setting up a HTTP Post in C#. I appreciate
I need a little help here please.What am trying to do is pull all

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.