use-instagram-account-info
React Hooks to fetch instagram account information. instagram-account-info
as main dependency.
To install it:
yarn add use-instagram-account-info
// or
npm install use-instagram-account-info --save
API Explained
In your app, you can add:
; { const info = ...}
info
object is composed of:
info
: It is eithernull
or an object.info.followers
:Number
of followersinfo.following
:Number
of people followinginfo.isPrivate
:Boolean
info.isVerified
:Boolean
info.posts
:Number
of postsinfo.profileImage
:String
, Avatar Url
Example
; { const username = 'katalonne' const info = ; if !info return null; const followers following isPrivate isVerified posts profileImage } = info; return <div> <p>username has followers followers</p> <p>username is following following people</p> <p>username has profile set to private: isPrivate </p> <p>username has verified profile: isVerified</p> <p>username has posts posts</p> <p>username has followers followers</p> <img src=profileImage /> </div> ;}
License
MIT License © Catalin Besleaga