Thursday, February 16, 2012

Facebook Open Graph

  1. Check out Facebook API Explorer: https://developers.facebook.com/tools/explorer
  2. Make sure 'Access Token' field is filled out by clicking 'Get Access Token'
  3. 3) In the box next to 'GET' paste the following text '333474563361578/events'. 
  4. Click 'Submit'
  5. The following JSON data is returned. It contains 2 events that are currently listed on this page https://www.facebook.com/pages/Mason-Events/333474563361578?sk=events
{
"data": [
{
"name": "Films Committee Meeting",
"start_time": "2012-02-27T20:30:00",
"end_time": "2012-02-27T23:30:00",
"location": "George Mason University",
"id": "170763413035583"
},
{
"name": "Special Events Committee Meetings",
"start_time": "2012-02-27T19:30:00",
"end_time": "2012-02-27T20:30:00",
"location": "George Mason University",
"id": "253568778055608"
}
],
"paging": {
"previous": "https://graph.facebook.com/333474563361578/events?format=json&limit=5000&since=1330374600&__paging_token=170763413035583&__previous=1",
"next": "https://graph.facebook.com/333474563361578/events?format=json&limit=5000&until=1330371000&__paging_token=253568778055608"
}
}

    6.  You can click on the id link to get more specific information about each event.
{
"id": "170763413035583",
"owner": {
"name": "Mason Events",
"category": "Community",
"id": "333474563361578"
},
"name": "Films Committee Meeting",
"description": "Where: PB Office\n\nWant to plan special film events on campus and help pick what is showing the JC cinema on the weekends? Come on out to the committee meetings!!!!",
"start_time": "2012-02-27T20:30:00",
"end_time": "2012-02-27T23:30:00",
"location": "George Mason University",
"venue": {
"latitude": 38.830211976257,
"longitude": -77.308175843647,
"id": "5625209996"
},
"privacy": "OPEN",
"updated_time": "2012-02-17T02:35:40+0000",
"type": "event"
}

No comments: