arsduo / koala

A lightweight Facebook library supporting the Graph, Marketing, and Atlas APIs, realtime updates, test users, and OAuth.

Home Page:http://developers.facebook.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Realtime Updates for Pages an App Manages

stevendelarwelle opened this issue · comments

Realtime updates doesn't have a method to subscribe an app to pages managed by that app. After going over the Fb Webhook Documentation is looks like its not only possible but fairly simple.

Heres what the request needs.
PAGE_ID
PAGE_TOKEN

all you need to do is make POST request to /page_id/subscribed_apps using the page token your app was assigned for that page. Fb returns {"success":true} and you are now subscribed.
graph

currently realtime updates isn't set up to take a page id.

@updates = Koala::Facebook::RealtimeUpdates.new(:app_id => YOUR_APP_ID, :secret => YOUR_APP_SECRET)

or

@updates = Koala::Facebook::RealtimeUpdates.new(:app_id => YOUR_APP_ID, :app_access_token => YOUR_ACCESS_TOKEN)

If realtime updates could be changed to include this functionality that would be great.