Get photos from Instagram by hashtags.
The full documentation is at https://django-instagram-photo-api.readthedocs.io.
Install Django Instagram photo api:
pip install django-instagram-photo-api
Install Django Facebook photo api from GitHub:
virtualenv photostream source photostream/bin/activate pip install -e git+https://github.com/softformance/django-instagram-photo-api.git#egg=django-instagram-photo-api
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'django_instagram_photo_api',
...
)
Add Django Instagram photo api's URL patterns:
from django_instagram_photo_api import urls as django_instagram_photo_api_urls
urlpatterns = [
...
url(r'^instagram_app/', include(django_instagram_photo_api_urls,
namespace="instagram-feed")),
...
]
- Create at Instagram Developer new application.
- Add into Django admin
Instagram applications
model yourclient id
,secret id
,access token
. - Add a hashtag to your
Hashtags
model. - Sync your posts :)
- Retrieve from Instagram photos by hashtag.
- Sync added hashtags, add a post by URL and add a post manually.
- Get photos from your backend server by simple URL.
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Tools used in rendering this package: