title: Connection refused error while using python-Instagram API
body: <p>I tried to run a simple code to extract data from Instagram using <a href="https://github.com/Instagram/python-instagram" rel="nofollow">Python-Instagram</a> module</p>
  
  <p>The code is</p>
  
  <pre><code>from instagram.client import InstagramAPI
  api = InstagramAPI(client_id='YOUR_CLIENT_ID',client_secret='YOUR_CLIENT_SECRET')
  popular_media = api.media_popular(count=20)
  </code></pre>
  
  <p>I am getting a <code>Connection refused</code> error at the last lineline. Its because <code>Python-Instagram</code> module uses <code>httplib2</code> module also. The error looks like this.</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/home/anaconda/lib/python2.7/site-packages/httplib2-0.9-py2.7.egg/httplib2/__init__.py", line 1060, in connect
  raise socket.error, msg
  socket.error: [Errno 111] Connection refused
  </code></pre>
  
  <p>How to resolve this? Do I have to provide any connection specifications for using this module?</p>