Skip to content
Facebook Ads API for crystal. Since this is alpha stage, the proto schema may be updated without compatibility.
Crystal TSQL Makefile
Branch: master
Clone or download
Latest commit 5ce8cf8 Sep 15, 2019 Build Status

facebook api for Crystal.

  • crystal: 0.30.0

Usage (library)

require "facebook"

client = "xxxxxx")
res = client.get("/me")
puts res.body

Usage (facebook application)

setup config (first time only)

Generate sample by config, then set access_token. That's all.

$ facebook config sample > .facebookrc
$ vi .facebookrc
access_token    = "xxxxxx"

You can verify the access_key by invoking api me.

$ facebook api me


builtin api commands

Just run facebook api to show all available api commands.

$ facebook api
[possible tasks]
  adaccounts, get, me

$ facebook api adaccounts

get is meta api commands that can invoke arbitrary commands by string.

$ facebook api get '/v4.0/me/adaccounts -d fields=account_id,name'


  1. Add the dependency to your shard.yml:
    github: maiha/facebook
    version: 0.4.3
  1. Run shards install


TODO: Write development instructions here


  1. Fork it (
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request


  • maiha - creator and maintainer
You can’t perform that action at this time.