Total newb to using Tweepy... please help!


#1

Hello! I am trying to develop a Twitter app using Python 2.7. I have absolutely no experience with Twitter development, and thus I’ve been trying to use online tutorials and resources to learn. I heard that Tweepy was really good, and so I downloaded Tweepy for Python 2.7 from

https://pypi.python.org/pypi/tweepy/1.8

and I’ve been trying to use the tutorial on

https://code.google.com/p/tweepy/wiki/GettingStarted.

However, when I type in…

import tweepy
public_tweets = tweepy.api.public_timeline()
for tweet in public_tweets:
    print tweet.text</code>

...into a new Python file, I get an error:

Traceback (most recent call last):
File “C:/Users/Me/Desktop/HelloWorld.py”, line 3, in
public_tweets = tweepy.api.public_timeline()
File “C:/Users/Me/Desktop\tweepy\binder.py”, line 185, in _call
return method.execute()
File “C:/Users/Me/Desktop\tweepy\binder.py”, line 168, in execute
raise TweepError(error_msg, resp)
TweepError: Twitter error response: status code = 403

From what I looked up, error 403 is “Forbidden.” I don’t really know what that means or how to fix that.

Could someone please help me? I would really appreciate it!


#2

I guess you didn’t authentificate in the script? You try to get the tweets but you can’t. Did you use:

consumer_key="…“
consumer_secret=”…“
access_token=”…“
access_token_secret=”…"

This is the best guess I can make as a total newb myself. Hope it helped.