Search code examples
ruby-on-railsfacebookkoala

Posting photo on Facebook with tags using Koala


I'm trying to post a photo using Koela using the following code but its not taging the users

@graph.put_picture(pic_url,{:message => msg,:tags => [{:id => "xxxxxxx"} ,{:id=>"xxxxxxx"}]})

Here's the facebook link buts its in PHP http://developers.facebook.com/docs/reference/api/photo/


Solution

  • There is no put_tag function in Koala so you have to use the more generic put_connections function:

    @graph.put_connections(you_image_id, 'tags', {"to" => uid})
    

    https://github.com/arsduo/koala/blob/master/lib/koala/api/graph_api.rb#L144