Skip to content
This repository

OpenGraph

app = FbGraph::Application.new(APP_ID)
me = FbGraph::User.me(ACCESS_TOKEN)


## Play (pre-configured for Game apps)

# Fetch activities
actions = me.og_actions "games.plays"

# Publish an activity
action = me.og_action!(
  "games.plays",
  :game => 'http://samples.ogp.me/163382137069945'
)


## Custom Action (you need to configure them in your app setting)

# Fetch activities
actions = me.og_actions app.og_action(:custom_action)

# Publish an activity
action = me.og_action!(
  app.og_action(:custom_action), # or simply "APP_NAMESPACE:ACTION" as String
  :custom_object => 'http://samples.ogp.me/264755040233381'
)
Something went wrong with that request. Please try again.