使用Koala在Facebook上发布照片 [英] Posting photo on Facebook with tags using Koala

查看:153
本文介绍了使用Koala在Facebook上发布照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下代码使用Koela发布照片,但不会对用户进行调整。

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"}]})

这是Facebook的链接,但它的PHP
http://developers.facebook.com/docs/reference/api/photo/

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

推荐答案

在考拉没有put_tag函数,所以你必须使用更通用的put_connections函数:

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

这篇关于使用Koala在Facebook上发布照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆