[ ruby ] Koala::Facebook::API

Subscribe app

@graph = Koala::Facebook::API.new(access_token)

@graph.put_object(page-id, 'subscribed_apps')

@graph.delete_connections(page-id, 'subscribed_apps')

post wall

@graph.put_wall_post("Hello there!", {
  "name" => "Link name",
  "link" => "http://www.example.com/",
  "caption" => "{*actor*} posted a new review",
  "description" => "This is a longer description of the attachment",
  "picture" => "http://www.example.com/thumbnail.jpg"
})

define API version globally

Koala.config.api_version = "v2.0"

or locally

@graph.get_object("me", {}, api_version: "v2.0")

ref : https://github.com/arsduo/koala,

https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps,

http://www.rubydoc.info/github/arsduo/koala/Koala%2FFacebook%2FGraphAPIMethods%3Aput_wall_post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s