instagram_graph_api

Version, currently 0.1.01 version
  • 0.1.0latestAug 18, 2022

github.com/confact/instagram_graph_api.cr

Instagram Graph API client for crystal

1 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  instagram_graph_api:
    github: confact/instagram_graph_api.cr
    version: ~> 0.1.0

Then run:

shards install

shard.yml

Crystal
1.4.1
License
MIT
Author
Håkan Nylén

Dependencies

This version declares no dependencies.

README

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

  1. Add the dependency to your shard.yml:

    dependencies:
      instagram_graph_api:
        github: confact/instagram_graph_api.cr
  2. 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

  1. Fork it (https://github.com/confact/instagram_graph_api.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