Automagically post your Instagram photos to a perfect SEO blog. Turn your Instagram account into a website.
MIT License
A few days ago wife @za.yuliia
was banned from instagram for her πΊπ¦ posts. There was no indication that her account would be restored. She felt awful about it, because she had spent a lot of time creating her page, her posts. Hopefully this tool would give her a reliable data backup that is easy to access.
Another reason would be my sister @alisa.shmarova
is trying to be a blogger. She writes a lot of useful posts about travelling to different cities. Content on instagram is not searchable and is short-lived. The posts she writes are evergreen. Having a blog would let her content be evergreen and searchable.
Initially I was inspired with this idea after hearing of some guy who created "Sheets2Site".
This is a media channel that you completely own. Your own auto-generated website.
Share urls to your posts on the blog to drive traffic to your website.
The application let's you "copy" a snapshot of your instagram posts on a regular basis.
You can search for posts content in the local copy of the account.
Flow of connecting and using Instagram Basic Display API:
code
code
is exchanged for a short_lived_access_token
(60 min valid)short_lived_access_token
is exchanged for a long_lived_access_token
(60 days valid)long_lived_access_token
can be used to get:username
, media_count
)user_media
datalong_lived_access_token
should be refreshed every 59 days.API limitations: it does not get
oAuth on localhost*
Set up https://localhost:3000/instagram/callback
as a 'Valid OAuth Redirect URI', because Facebook allows only https
, not http
.
The redirect will go to the URL https://localhost:3000/instagram/callback?code=***
and give a Secure Connection Failed
error. Change https
to http
in the redirected URL and submit.
Clone app, start server
git clone [email protected]:yshmarov/insta2blog.com.git
cd insta2blog.com
bundle
rails db:setup
bin/dev
To properly use the app, you will need valid Instagram basic display API keys.
Add them to your credentials file. Example:
# credentials.yml
instagram:
client_id: 123
client_secret: abc123
The app uses gem data-migrate. To run data migrations together with regular ones:
rails db:migrate:with_data
Got an idea π‘? Open an issue.
If you create a PR (if you can), preferably with tests π.