Project

ajar

0.0
No commit activity in last 3 years
No release in over 3 years
Uses Ajar's API to insert public URIs in place of local APIs for Facebook Open Graph connections.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Ajar

Allow Facebook access to your local pages when creating Open Graph objects and actions via the Ajar API.

Usage

Add the gem to your application's Gemfile:

gem 'ajar', '0.1.0'

Wrap your Koala graph in an Ajar instance with your developer key from http://ajar-web.herokuapp.com, and use put_connections to create a new open graph object.

graph = Ajar.new Koala::Facebook::API.new(token), 'my-token'
graph.put_connections 'me', 'namespace:action', :object => object_uri

When you're operating in a local Rails environment (development or test), Ajar will copy the HTML from the given URI to a public address which Facebook can access. When anyone other than Facebook accesses it, it'll redirect back to the original URI.

The generated public URIs for Facebook use both your developer key and a per-graph-object unique key - so they're not easy to guess. Also: don't go sharing your developer key unnecessarily. All that said - if you're happy with Facebook accessing your page, you shouldn't be too concerned about the page being available to the general public anyway.

Upcoming changes

  • Proper domain for the site.
  • Ability to customise which environments are considered 'local'.
  • Developer key managed on a global level, instead of per instance.
  • Tests.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request