Ronan Lopes
Ronan Lopes

Reputation: 3398

Facebook Koala Gem Version

I'm trying to retrieve a single post to comment on it. I'm using the gem koala on, rails, but even setting the version of api to 2.0 (I checked on Koala.config.api_version), it returns the error "Koala::Facebook::ClientError: type: OAuthException, code: 12, message: (#12) singular statuses API is deprecated for versions v2.4 and higher [HTTP 400]"

Does anyone knows how to fix it? Thanks

Upvotes: 0

Views: 695

Answers (2)

cenanozen
cenanozen

Reputation: 1130

You could also set the API version in an initializer:

config/initializers/koala.rb

Koala.configure do |config|
  config.api_version = "v2.0"
end

Upvotes: 0

Ronan Lopes
Ronan Lopes

Reputation: 3398

Got it. With the method put_comment("post_id", {}, api_version: "v2.0") it worked

Upvotes: 0

Related Questions