Find out the best day and time of the week to upload your Instagram pictures making use of Facebook Graph API, Python, Jupyter and Seaborn.
With this notebook, you'll be able to retrieve your Instagram media data and represent it via a heatmap graph.
Before we can proceed to access our Instagram account data, we’ll need to ensure an initial set up:
- Ensure you have an Instagram business account. Only data belonging to business accounts can be accessed via API. You can switch your normal Instagram account to “business” with no costs (but keep in mind the account visibility permissions will change and it’ll be publicly accessible).
- You’ll need a Facebook page linked to the Instagram business account. This will allow you to use the new Facebook Graph API.
- Ensure you have a Facebook developer account and create an app with permissions to access Instagram media data (instagram_basic).
- Give the API a go from the Facebook explorer tool and generate an access token: https://developers.facebook.com/tools/explorer/v2/
To execute the notebook, replace to use your access token and 'XXXX' user Instagram id 'yyyy'.