Search code examples
ruby-on-railsfacebookfacebook-graph-apivideokoala

How do I post a message with a video to a Facebook Page using Koala?


I'm trying to post a video along with a message on a Page with Koala. I'm not referring to the title or caption, but a message just like a normal wall or picture post.

For example, this is how I'm posting a picture:

page_graph = Koala::Facebook::API.new(some_page_access_token) page_graph.put_picture(some_picture_url, {message: "hello, world!"}, page_id)

This works perfectly. I end up with a post on the page's wall with my photo and the message provided.

I'm doing something very similar with videos:

page_graph = Koala::Facebook::API.new(some_page_access_token) page_graph.put_video(some_video_url, {message: "hello, world!"}, page_id)

However, in this case, my video posts, but my message is not posted.

The picture below highlights what I'm trying to achieve.

Any help would be appreciated. Thanks!

enter image description here


Solution

  • Actually, I just figured this out. Supposed to use description instead of message.

    It should be: page_graph.put_video(some_video_url, {description: "hello, world!"}, page_id)