1

Today I stumbled over two apparantly undocumented FQL tables

  • open_graph_action (contains OpenGraph actions)
  • open_graph_object (contains OpenGraph objects)

The structure of the open_graph_object table is the following (extracted by using metadata=1 as parameter on a specific object):

enter image description here

It can be queried like this:

SELECT admins, application, audio, created_time, data, description, determiner, image, is_scraped, locale, post_action_id, profile_id, restrictions, see_also, site_name, title, type, updated_time, url, video FROM open_graph_object WHERE type="{APPLICATION_NAMESPACE}:{OBJECT_TYPE}"

To be able to execute the query, you need an App Access Token of the App under whiches namespace the object was established. I wasn't able to extract the object_id, because the id field is seemingly not present. I guess it's just called otherwise. With the above query, you'll get all OpenGraph objects of the specified type. Using LIMIT start, count works for me as well.

The structure of the open_graph_action table is the following (using metadata=1 as parameter on a specific object isn't working, so compiled manually):

enter image description here

SELECT id, actor_id, objects, tags, start_time, end_time, publish_time FROM open_graph_action WHERE id = {PUBLISHED_ACTION_ID}

To query this table, you need an object_id of a published action. Permission-wise, a User Access Token with read_stream permission for the App under whiches namespace the action was published.

My questions:

  • Is somebody actually using these tables?
  • If so, how can one retrieve a certain OpenGraph object by its ID?
Tobi
  • 30,855
  • 7
  • 52
  • 89

1 Answers1

1

These are part of Facebook's "Custom Stories" feature; where applications can publish feed items like the one shown below. The Action is the verb while the Object is the noun.

enter image description here

A lot of games and websites use these actions, however you might not have noticed them in your news feed because of the many different factors which affect the prominence of items shown there.

You can read more about custom stories here. Also check out the specific pages which relate to the "objects" and "actions".

Facebook never published the FQL docs for the tables related to the actions and objects - but there are a few pages on the web where others have used the FQL tables too. Also, at least one StackOverflow question if you hunt around. At the moment, it looks like Facebook would prefer developers to use the Graph API to retrieve objects etc. The docs say that reads should be made in this format:

GET /{object-instance-id}

And data such as this will be returned:

{
  "id": "1015012577744568"
  "type": "social-cookbook:recipe", 
  "url": "http://www.example.com/cookies.html", 
  "description": "Best Cookies on Earth!", 
  "title": "Chocolate Chip Cookies", 
  "image": "http://www.example.com/cookies.png"
}

The Getting Started with Custom Stories tutorial is a good place to see how easy it is to play with this feature.

Community
  • 1
  • 1
madebydavid
  • 5,858
  • 2
  • 19
  • 28
  • Thanks for your effort and explanation. I already know about those Custom Stories, my questions were whether somebody uses these tables and how I can retrieve one specific object_id. Thanks anyway! – Tobi Apr 23 '14 at 12:30