bulleric
bulleric

Reputation: 2127

Koala like doesn´t work

I am currently develop a facebook application. I create actions and objects with opengraph and i can post new objects in my application with the koala methods. This work all certainly.

Now i want to post a like to a specified object

in my rails console i try to use something like this:

user = User.find("id")

user.facebook.get_connection("me", "my_namespace:like", object: "myobjecturl")

The facebook method defines the koala api object Koala::Facebook::API.new(oauth_token)

but i got a exception

Koala::Facebook::APIError: OAuthException: Unknown path components: /my_namespace:like

Upvotes: 1

Views: 536

Answers (2)

JZC
JZC

Reputation: 470

To be more explicit, here's the precise code for Koala:

user.facebook.put_connections("me", "og.likes", object: "myobjecturl")

Facebook won't let you define a custom like action for your app, so you have to use "og.likes" without a namespace.

Upvotes: 2

C3roe
C3roe

Reputation: 96373

I guess you are talking about the build-in Open Graph like action here – that has to be published against /userid/og.likes (and not /userid/my_namespace:like as you’re trying to do).

Upvotes: 1

Related Questions