instagram_graph_api.cr v0.1.0
instagram_graph_api
An API Client for Instagram Graph API.
You can get:
- Business accounts
- User details
- Recent posted media
- Media details
- Media Insights
Supported media:
- Image
- Video/Reel
- Story
You can only get data, not update or post right now.
Based on the Ruby library https://github.com/rakeshpatra/instagram_graph_api
Installation
-
Add the dependency to your
shard.yml
:dependencies: instagram_graph_api: github: confact/instagram_graph_api.cr
-
Run
shards install
Usage
require "instagram_graph_api"
access_token = "your_access_token"
instagram = InstagramGraphApi::Client.new(access_token)
p! instagram.ig_business_accounts # list of all business accounts for these access token
p! instagram.business_account_id # only return the business account id, for api calls like below
p! instagram.user_recent_media(instagram.business_account_id)
p! instagram.user_recent_media(instagram.business_account_id, type: "story") # get stories
p! instagram.insights("media_id")
Development
TODO: Write development instructions here
Contributing
- Fork it (https://github.com/confact/instagram_graph_api.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
- Håkan Nylén - creator and maintainer
Repository
instagram_graph_api.cr
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- over 1 year ago
- August 17, 2022
License
MIT License
Links
Synced at
Thu, 16 May 2024 22:08:31 GMT
Languages