I'm making a Facebook app in Rails using Koala gem.

My app needs to **upload** a picture to a Page's Album and **tag** the User who submitted it.

I keep getting this error when I want to tag the photo:

```
Koala::Facebook::ServerError in PhotosController#update
type: OAuthException, code: 1, message: An unknown error has occurred. [HTTP 500]

```

My app already have `publish_actions` permission set, so it's not permission issue.

Here's my code:

```
# token, photo_id, and user_id is confirmed to be not the problem

@graph = Koala::Facebook::API.new(token)
@graph.put_connections(photo_id, "tags",
  {
    tag_uid: user_id
  }
)

```

If I'm using User's Token, the photo is tagged successfully but still goes to that Error page. If with Page's Token, nothing is tagged and goes to Error.

Any hint or solution?

Thanks