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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:32:36+00:00 2026-06-17T07:32:36+00:00

I am using facebook graph api to search for posts matching a particular query.But

  • 0

I am using facebook graph api to search for posts matching a particular query.But I cannot find any documentation about the time zone of the time stamp returned in the json format.

My query is this and the response the JSON arrray where each element has a timeStamp which looks like this :
2013-01-15T14:27:49+0000

How do I use this timeStamp ( without time zone information ) to display fb content on an external website:

 <snip>post content </snip> poster-profile image</snip>
   < snip> post created 5 minutes ago </snip> 

Edit : I am using the grails framework for the backend implementation. hence using php code to obtain timeStamp information would not be very easy

Edit 2 : I am using the search api to search over all publicly accessible posts, so I am not suing any access token.

Edit 3 : closing this question as a possible duplicate of this.

  • 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-17T07:32:38+00:00Added an answer on June 17, 2026 at 7:32 am

    If you are using PHP, you may use this-

    // DISPLAYS COMMENT POST TIME AS "1 year, 1 week ago" or "5 minutes, 7 seconds ago", etc...
    function time_ago($date,$granularity=2) {
        $date = strtotime($date);
        $difference = time() - $date;
        $periods = array('decade' => 315360000,
            'year' => 31536000,
            'month' => 2628000,
            'week' => 604800, 
            'day' => 86400,
            'hour' => 3600,
            'minute' => 60,
            'second' => 1);
    
        foreach ($periods as $key => $value) {
            if ($difference >= $value) {
                $time = floor($difference/$value);
                $difference %= $value;
                $retval .= ($retval ? ' ' : '').$time.' ';
                $retval .= (($time > 1) ? $key.'s' : $key);
                $granularity--;
            }
            if ($granularity == '0') { break; }
        }
        return ' post created '.$retval.' ago';      
    }
    

    Reference.

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

Sidebar

Related Questions

I tried to search for comments on keyword using graph API https://graph.facebook.com/search?q=QUERY that lists
I want to search near places on Facebook using Graph Api . double lat
I can make a search query using these tokens here: http://developers.facebook.com/docs/api#search in the links:
Using Facebook Graph API, for group posts, we were able to retrieve the data
Hello I am using facebook graph api..and trying to display comments of each post..But
I'm trying to search people using the Facebook API (Graph API or FQL, whichever
Hi I am currently working on Search feature of Facebook Graph API using C#
I am using facebook graph API to search public informations, So how could i
I'd like to post a Link to Facebook using the Graph API , but
So I'm creating posts to the facebook user's wall using Graph API I'm referring

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.