packages feed

apis-0.0.1: apis/facebook/facebook.graph.user.feed.post.xml

<?xml version="1.0" encoding="utf-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
  <meta>
    <author>
      Fabian Bergmark
    </author>
    <documentationURL>
      https://developers.facebook.com/docs/graph-api/reference/v2.2/user/feed
    </documentationURL>
  </meta>
  <bindings>
    <select produces="JSON">
      <urls>
        <url>
          https://graph.facebook.com/v2.2/{user_id}/feed
        </url>
      </urls>
      <inputs>
        <key id="user_id" paramType="path" required="true" type="xs:string"/>
        <key id="access_token" paramType="query" required="true" type="xs:string"/>
        <key id="message" paramType="variable" required="false" type="xs:string"/>
        <key id="link" paramType="variable" required="false" type="xs:string"/>
        <key id="actions" paramType="variable" required="false" type="xs:string"/>
        <key id="place" paramType="variable" required="false" type="xs:string"/>
        <key id="tags" paramType="variable" required="false" type="xs:string"/>
        <key id="privacy" paramType="variable" required="false" type="xs:string"/>
        <key id="object_attachment" paramType="variable" required="false" type="xs:string"/>
      </inputs>
      <execute><![CDATA[
      var data =
      { message: message,
      link: link,
      actions: actions,
      place: place,
      tags: tags,
      privacy: privacy,
      object_attachment: object_attachment };
      try {
      response.object =
      y.rest(request.url)
      .contentType('application/x-www-form-urlencoded; charset=UTF8')
      .post(request.querystring(data)).response;
      } catch(err) {
      response.object = {'result':'failure', 'error': err};
      }
      ]]>
      </execute>
    </select>
  </bindings>
</table>