Specifying the date format for a facebook event start time in a graph API call

2.1k views Asked by At

According to the following documentation the format of dates returned from the Facebook API can be adjusted via the date_format parameter. In the REST URL below I have implemented the parameter "U" in a facebook event call specifying that I'd like my date returned as a UNIX time stamp.

https://graph.facebook.com/269229076559525?date_format=U?access_token

If you look at the returned JSON the updated_time field is now returned as a unix time stamp but the start_time field is unaffected.

{
  "id": "269229076559525", 
  "owner": {
    "name": "{removed}", 
    "id": "{removed}"
  }, 
  "name": "Windham Flat's Winter Dance Party", 
  "description": "Windham Flat's Winter Dance Party, Featuring:\n\nWindham Flat\nThat's Not Her\nEl Super Ritmo!\n\nSaturday, December 21st, Make-Out Room\n", 
  "start_time": "2013-12-21T19:30:00-0800", 
  "timezone": "America/Los_Angeles", 
  "is_date_only": false, 
  "location": "Make-Out Room", 
  "venue": {
    "latitude": 37.755280780054, 
    "longitude": -122.41943796736, 
    "city": "San Francisco", 
    "state": "CA", 
    "country": "United States", 
    "id": "32498706383", 
    "street": "3225 22nd Street", 
    "zip": "94110"
  }, 
  "privacy": "OPEN", 
  "updated_time": 1386740974
}

Can any one suggest how I might get the API to return my start_time as the specified date_format as well.

0

There are 0 answers