ruby - How to embed a link in a Facebook post through the Graph API -


i want post in behalf of user message contains link facebook page. achievable through facebook interface choosing autocompleted name of page:

example of embedded link

i use ruby koala gem. tried this:

graph = koala::facebook::api.new(access_token) graph.put_object(page_id, "feed", message: "embedded @[23497828950:national geographic] link") 

but doesn't convert link. post full url doesn't nice.

is there way achieve same thing on facebook (a linked page title) through graph api?

this can accomplished using open graph actions.

post /me/cookbook:eat?      recipe=http://www.example.com/recipes/pizza/&      message=you should try recipe @[115401158528672]&      access_token=valid_access_token 

if not aware of open graph api, can start here: https://developers.facebook.com/docs/opengraph/

just follow steps mentioned in tutorial, quite easy integrate , make stories more beautiful.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -