-
-
Notifications
You must be signed in to change notification settings - Fork 191
OpenGraph
nov matake edited this page Nov 7, 2011
·
1 revision
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'
)