facebook.cr
facebook api for Crystal.
- crystal: 0.33.0
Usage (library)
require "facebook"
client = Facebook::Client.new(auth: "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
api
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 '/v6.0/me/adaccounts -d fields=account_id,name'
Development
- Add the dependency to your
shard.yml
:
dependencies:
facebook:
github: maiha/facebook
version: 0.4.9
- Run
shards install
Development
TODO Write development instructions here
Contributing
- Fork it (https://github.com/maiha/facebook.cr/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- maiha - creator and maintainer