How-to: recieving access token for Instagram (http://www.instagram.com).
Go to developers page page. Login, if needed.
Create new app ("Register Your Application" button). Then create a new app.
Fill all the fields (Application Name, Description, Website, and OAuth redirect_uri). Type whatever you want, just remember about urls format.
After application creation go to "managers page" and copy Client ID and Redirect URI.
Substitute them into this URL: https://instagram.com/oauth/authorize/?client_id=[Client_ID]&redirect_uri=[Redirect_URI]&response_type=token
and open it in your browser.
You will be asked to authorize your app and after this you will be redirected to the page, specified earlier. In browser address bar - in the end of your redirect address "access_token" parameter would be written. As for now, this token doesn't expire, so you need to do this task only once.
Only access_token string is needed to make requests through Instagram connector. So just save it to KeyChain:
from smapy.network_connectors.addons import KeyChain
k = KeyChain()
k.assign('ig', access_token)
k.dump()
After enetering and storing token in KeyChain it can be used to gather data through Instagram connector:
>>> from smapy.network_connectors.addons import KeyChain
>>> k = KeyChain()
>>> k.load_last()
>>> k.check('ig')
True
>>> from smapy.network_connectors.vkontakte import InstagramConnector
>>> i = InstagramConnector(token = k.get('ig'))
>>> i.accounts = {'RIA Novosti':'ria_novosti'}
>>> i.profiles()
{'RIA Novosti': {'followers': 75645,
'id': u'40148843',
'link': 'http://instagram.com/ria_novosti',
'name': u'РИА Новости',
'nickname': 'ria_novosti'}}