Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7630669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:09:42+00:00 2026-05-31T06:09:42+00:00

import twitter api = twitter.Api(consumer_key=’ ‘, consumer_secret=’ ‘, access_token_key=’ ‘, access_token_secret=’ ‘) friends=api.PostUpdate(First Tweet

  • 0
import twitter

api = twitter.Api(consumer_key=' ',
                       consumer_secret=' ',
                        access_token_key=' ',
                        access_token_secret=' ')

friends=api.PostUpdate("First Tweet from PYTHON APP ")

I have done everything as said at http://abhi74k.wordpress.com/2010/12/21/tweeting-from-python/ but when I full inside it and press enter, nothing happens. Can you help me about that?

Ok it is because of that I couldn’t download python-twitter API correctly. It gives me this error when I try to follow those steps:

figen@figen-Satellite-A350:~/Downloads/python-twitter-0.8.2$ python setup.py install
running install
running build
running build_py
running install_lib
copying build/lib.linux-x86_64-2.7/twitter.py -> /usr/local/lib/python2.7/dist-packages
error: /usr/local/lib/python2.7/dist-packages/twitter.py: Permission denied

http://code.google.com/p/python-twitter/

Ok I installed setup.py but now it gives this error:

figen@figen-Satellite-A350:~/Downloads/python-twitter-0.8.2$ python twitter_test.py
Traceback (most recent call last):
  File "twitter_test.py", line 29, in <module>
    import twitter
  File "/home/figen/Downloads/python-twitter-0.8.2/twitter.py", line 65, in <module>
    import oauth2 as oauth
ImportError: No module named oauth2

Now it says twitter module doesn’t have the module. How to get it?

  api = twitter.Api(consumer_key='removed',
                       consumer_secret='removed',
                        access_token_key='removed',
                        access_token_secret='removed')

  friends=api.PostUpdate("If you see this,I managed to send my first tweet from Python    Shell. Yay! =)")
  Traceback (most recent call last):
  File "<pyshell#5>", line 1, in <module>
  api = twitter.Api(consumer_key='removed for security=)',
  AttributeError: 'module' object has no attribute 'Api'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:09:43+00:00Added an answer on May 31, 2026 at 6:09 am

    There are several things causing your problem.

    1) The permission denied error (error: /usr/local/lib/python2.7/dist-packages/twitter.py: Permission denied) is because you do not have administrator privileges. Try sudo python setup.py install

    2) You need to install the missing dependencies (i.e. oauth2) you can get oauth2 from here http://github.com/simplegeo/python-oauth2 make sure you have the other dependencies needed which are SimpleJson and HTTPLib2. You can find more details on this information on the python-twitter-api site.

    Hope this solves it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use twitter-python search API to retrieve search results like below import twitter api
#!/usr/bin/python # -*- coding: iso-8859-1 -*- import Tkinter import twitter class simpleapp_tk(Tkinter.Tk): def __init__(self,parent):
I'm fairly new to Python. And this is my first class: import config #
I have a python script that is constantly grabbing data from Twitter and writing
I am using this code to get the userInfo twitter = oauthtwitter.OAuthApi(CONSUMER_KEY, CONSUMER_SECRET, access_token)
I'm trying to import an XML that's provided by twitter into a readable format
import sys sys.path.append('/home/myuser/svn-repos/myproject') from myproject.settings import * But, it says module not found when
I need to import Twitter posts (single account) into a Drupal site to display
I am trying to write a twitter client application in python. I would like
i'm writing a small script to tweet messages from the monitoring systems. The only

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.