Singly/hallway — pull request #649 by kristjan (2012-11-09 04:10:36+00:00)
Title: Support Facebook Open Graph actions

Many apps use Facebook's Open Graph object/action framework to publish stories like "Kristján _took_ a _photo_", and we've had a few requests to support it.

Relevant FB docs: https://developers.facebook.com/docs/opengraph/actions/

Since it is specific to Facebook, I propose putting it under `/services/facebook`, usable as follows:

POST /services/facebook/og/:?og_*=value

Anything prefixed with `og_` will have the `og_` stripped and be passed on the Facebook. As an example, taking a photo with Instagram would look like

POST /services/facebook/og/instagram:took?og_photo=URL

and be passed to Facebook as

POST /me/instagram:took?photo=URL

Using the `og_` prefix allows for use of Singly-specific parameters like `from` and `to` next to arbitrary Facebook options like `start_time` or `tags`.

### Maybe

To ease things when sending a lot of parameters, we could also accept `?og=`. Anything prefixed with `og_` would be merged into the JSON object sent as `og`.

POST /services/facebook/og/instagram:took?og={"photo": "URL"}&og_tags=204381

becomes

POST /me/instagram:took?photo=URL&tags=204381

We could also support HTML form-style parameters, though we don't (intentially) do this anywhere else as far as I know.

POST /services/facebook/og/instagram:took?og[photo]=URL&og[tags]=204381