如何从GAE发推文

2024-05-20 00:00:48 发布

您现在位置:Python中文网/ 问答频道 /正文

我想能够从我的应用程序在GAE上运行Tweet。在

为此,请推荐一些Python库或httpapi。在


Tags: 应用程序tweetgaehttpapi
3条回答

这个项目对我有用:https://github.com/tav/tweetapp/blob/master/standalone/twitter_oauth_handler.py 它只有一个文件,所以很容易启动它并使用OAuth对twitter进行身份验证。在

关于pythontwitter:我认为您可以使用这个库,它似乎与GAE兼容:http://code.google.com/p/python-twitter/source/browse/twitter.py

同时:

Twitter有一个非常好的restapihttps://dev.twitter.com/docs/api,您也可以简单地使用appengine中的urlphetch和simplejson。在

对于身份验证,Twitter使用OAuth并建议了解其工作原理:

Twitter supports a few authentication methods and with a range of OAuth authentication styles you may be wondering which method you should be using. When choosing which authentication method to use you should understand the way that method will affect your users experience and the way you write your application.

Twitter分享了一个非常好的如何https://dev.twitter.com/docs/auth/oauth

您还可以看到jaikuengine的代码:http://code.google.com/p/jaikuengine/source/browse/trunk/oauth_client.py部分。在

我以前用过twython。我不记得是什么让我选择了它而不是其他的库,但是我在GAE上使用它,并且它是最新的。在

相关问题 更多 >