Search code examples
phpfacebookfacebook-graph-apifacebook-fqltin-can-api

What's the relation between Facebook Activity Streams and the Tin Can API?


A long time ago I did a project using the Facebook SDK in which you could pull data from Facebook about your users using a noun, verb, object format; for example, John Miller made a smoothie; or Jane Rosin likes the Beatles. I believe it used the graph api and FQL to pull these results; also the user had to give you access to their information.

I believe I implemented it using Facebook Connect in PHP, and the user would have to allow access to the site or Facebook application before we could access the FQL queries.

This sounds to be similar to the xapi (Experience API / Tin Can API) since the xapi also utilizes an noun, verb, object format; so is there any connection between the two formats? Or if I wanted to store the results of an FQL query somewhere, for instance in a Learning Record Store; would I need to convert the formats? There's a mention of Facebook and activity streams here on the Tincan API website.


Solution

  • As that article points out the xAPI (or Tin Can API at the time) was advised by what existed in the Activity Streams specification, but was extended to allow it to capture a wider range of data and specifically data relevant for e-learning. Additional items were added to the Statement structure (the format of stream data storage in xAPI) to provide for interoperable communication between systems, such as the stored, id, and timestamp properties. Presumably anything captured in the FB format could be translated into xAPI statements and therefore stored in an LRS because they share the same triple components and xAPI provides for extensions which essentially allows you to capture any arbitrary data. There could be some fidelity loss, and going the other direction would not work (in other words you can't take an arbitrary xAPI statement and turn it into an Activity Streams record, though the simplest of statements would likely work).