Tagged: twitter RSS Toggle Comment Threads | Keyboard Shortcuts

  • liduan 8:53 pm on May 1, 2009 Permalink | Reply
    Tags: , , , , , , twitter,   

    using python get friend timeline in twitter. following tools should be used:

    python-twitter

    python-simplejson

    first install python-simplejson, if in ubuntu, just using command as follows

    $apt-get install python-simplejson

    then, downloading python-twitter , unpackage it. then using command

      $ python setup.py build
      $ python setup.py install

    then, open python.

    >>> import twitter

    >>> api = twitter.Api(“username”, “passworld”)

    >>> posts = api.GetFriendsTimeline(‘username’)

    >>> print [post.text in post as posts ];

    for the file, the script should be liked:

    import twitter
    class mytwitter():

    def __init__(self):
    self._config = None

    def main():
    api = twitter.Api('username', 'passworld')
    posts = api.GetFriendsTimeline('username')
    for post in posts:
    print post.text.encode('utf-8')

    if __name__ == "__main__":
    main()

     
  • admin 1:42 pm on April 30, 2009 Permalink | Reply
    Tags: , twitter   

    some java client for twitter: java-twitter, jtwitter, twitter4j.

     
  • liduan 12:39 pm on April 17, 2009 Permalink | Reply
    Tags: , curl, , , twitter   

    post twitter tweet by using PHP script.

    via curl command in linux, 1 and 2.

    Using twitter php client.

    official API tutorial.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel