LoginSignup
3
3

More than 5 years have passed since last update.

koalaを使って写真のタグ付けを行う

Last updated at Posted at 2013-02-04

koalaでは写真のアップロードはあってもタグ付けは用意されていません。
なので

put_object

メソッドを使います。

流れとしては、
写真を投稿する -> 投稿した写真のIDを使ってタグ付けする

という流れになります。

graph = Koala::Facebook::API.new(access_token)
result = graph.put_picture("sample.jpg", {:message => "めっせーじ"} )

params = {
  :to => my_friend_id,
  :x  => tags_x,
  :y  => tags_y
}

tags_result = graph.put_object(result["id"], "tags", params)

put_obejtect メソッド を使えば koalaで標準で用意されているメソッド以外にも
拡張してfacebookのGraph API を使うことができます。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3