facebook.cr v1.0.0

CLI for the Facebook Marketing API.

facebook.cr Build Status

facebook api for Crystal.

Usage (as Application)

Download the x86_64 static binary from releases.

You can send an arbitrary GET request to the Facebook Marketing API.

$ facebook api get '/v19.0/me' -a <ACCESS_TOKEN>
$ facebook api get '/v19.0/me/adaccounts -d fields=account_id,name' -a <ACCESS_TOKEN>

Access tokens and other information can be put together in a configuration file.

$ facebook config sample > .facebookrc

$ vi .facebookrc
access_token    = "xxxxxx"

$ facebook api me

Usage (as Library)

  • crystal: 0.33.0
require "facebook"

client = Facebook::Client.new(auth: "xxxxxx")
res = client.get("/me")
puts res.body

Development

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

Contributing

  1. Fork it (https://github.com/maiha/facebook.cr/fork)
  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

Contributors

  • maiha - creator and maintainer
Repository

facebook.cr

Owner
Statistic
  • 9
  • 2
  • 2
  • 0
  • 9
  • 17 days ago
  • August 28, 2019
License

MIT License

Links
Synced at

Sun, 12 May 2024 03:56:51 GMT

Languages