简体   繁体   中英

Publish open graph story in facebook using ruby (fb_graph)?

I use fb_graph to create a post in facebook account. It works fine.

 me = FbGraph::User.me(session[:fb_token])
 me.feed!( :message => 'This is test message', :link => 'http://site.com', :name => 'Sports', :description => "Manish placed a bet on India vs England on Sports.com")

But Now, I need to post a story in facebook using fb_graph API. Can any buddy help!

Like in iOs: http://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/publish-open-graph-story/

and in ruby gem fb_graph I found some code related with Story: https://github.com/nov/fb_graph/search?q=story&ref=cmdform

It means fb_graph should support open-graph story.

It's given in their wiki

# 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'
)

https://github.com/nov/fb_graph/wiki/OpenGraph

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM