Search code examples
rubyfacebookfacebook-graph-apikoala

Facebook Graph API - Send page post with tag and thumbnail


I would like to send a post to a page of mine that contains another page tagged, and also, I would like the preview post would be from a link, but that link wouldn't necessarily be on the subtitle (kinda like when you paste a link, and facebook creates a preview, then you delete the link from the subtitle but the preview is still there). Is it possible to do that with graph api? I'm using Koala gem for ruby and didn't find anything like that on documentation. Thanks in advance!

EDIT:

already found how to do the preview (using link param):

@page_graph.put_connections('782353325261674', 'feed', message: "", link: "")

but still don't know how to tag another page on message


Solution

  • To tag a page, you format your message as @[page-id], eg message: "Thanks to @[22092443056] for their help" would tag Starbucks. Your app needs to be whitelisted by Facebook in order to use this functionality. Apply here - https://developers.facebook.com/docs/apps/review