Skip to content
Alex Koppel edited this page Feb 28, 2017 · 2 revisions

Try with the Graph API Explorer

Facebook's "Graph API Explorer":http://developers.facebook.com/tools/explorer/ is a fantastic tool for debugging. You can test out the calls you're making (which you can see via the Koala logger, below) and see whether the problems is with your Ruby code, Koala, or the Facebook API.

Logging Koala Requests

Koala includes a Logger utility -- if you're running into problems, it's easy to flip it on and see what requests are being made and what results are coming back. To enable logging add Koala::Utils.level = Logger::DEBUG (or whichever logger level you want).

Usage:

Koala::Utils.debug "message"
Koala::Utils.info "message"
Koala::Utils.warn "message"
Koala::Utils.error "message"
Koala::Utils.fatal "message"

To set the logger level:

Koala::Utils.level = Logger::DEBUG
Koala::Utils.level = Logger::INFO
Koala::Utils.level = Logger::WARN
Koala::Utils.level = Logger::ERROR
Koala::Utils.level = Logger::FATAL

Logging to a file

To send logs to a file:

Koala::Utils.logger = Logger.new("path/to/log")

Note: Doing this will set the level to DEBUG.

Using a custom logger

A custom logger can be used as long as it responds to the methods #debug, #info, #warn, #error, #fatal, and #level.

To use a custom logger:

Koala::Utils.logger = MyCustomLogger.new

File an issue!

If you've run into an issue, ask for help!

Facebook API issues

If your issue or question is with the Facebook API itself, "facebook.stackoverflow.com":http://facebook.stackoverflow.com is a great place to get support. As a sole maintainer I can't answer questions about how to use the Facebook API (which is huger than I can track), but the community there has a lot of great advice.

Here are situations in which StackOverflow is the right place:

  • You see the same problem with Koala, the Graph API Explorer, curl, etc. (e.g. it's not specific to Koala)
  • You're not sure how to do what you want to do on Facebook
  • Facebook doesn't seem to support what you want to do

Koala issues

Found an issue with Koala? Great! Let's get it fixed.

If you want to write up a pull request, that would be awesome. I'm happy to help answer any questions you have with that process. So much of Koala has been written by awesome community members.

If not, that's totally fine. Go ahead and open up an issue, answer the questions in the template, and we'll figure it out.

Situations in which opening an issue makes sense:

  • The problem happens in Koala but not in the Graph API Explorer or other libraries
  • You're getting a Ruby exception in the Koala code
  • You've found an issue with the documentation or other places

Thanks for using Koala!