Gtap 0.4.1 搭建备忘

由于众所周知的原因,首先有伟大的墙的存在,第二,Twitter的强制oauth,导致我原先的ubertwitter无法更新,只能寻求新的API

由于某些不明原因(有人说是RP,这种我是不会同意的),Twip始终无法搭建成功,怨念啊~等过两天再询问下细节吧

基于以上原因,我选择另一个支持oauth的Gtap

以下主要引用Gtap Install中部署该应用程序的步骤

以下过程中请自备翻wall程序

1.注册GAE账户

需要使用google帐号注册Google app engine

使用Google帐号登录 https://appengine.google.com/ 注册过程如下图

一个gmail帐号可以创建10个GAE应用

填写应用名创建应用,应用名称在后面会用到

2.注册Twitter应用程序,在twitter.com/apps中创建

注意Application Type 选“Browser”,Default Access type选“Read & Write”

Callback URL 则要填 “http://yourid.appspot.com/oauth/twitter/callback”。(yourid指app engine注册的程序名)

记住得到的consumer_key和consumer_secret

3. 软件下载和安装

需要安装Python2.5以上环境和Google App Engine SDK (for python)

Google App Engine SDK 下载地址:http://code.google.com/intl/zh-CN/appengine/downloads.html

Python 3.0好像有人下载后不好用,我没验证。我下的是2.7版本,地址:http://www.python.org/download/releases/2.7/

下载Gtap 0.4.1软件包,地址:http://code.google.com/p/gtap/

解压gtap-0.4.1.tar.gz,将文件夹改名为gtap(也可以不改,我是为了后面方便,懒~),放入Google_appengine安装目录下

修改 app.yaml

application: your_application_id              填写刚刚在App engine 注册的程序名称
version: 1                                                     第一次使用gtap可以不改,如更新,需更改数字
runtime: python
api_version: 1

handlers:
- url: /static
static_dir: static

- url: /.*
script: main.py
secure: always                                          由于某墙原因,可将其注释掉,在前面加上”#”符号

修改main.py, 查找CONSUMER_KEY和CONSUMER_SECRET,并将刚在twitter注册的app对应的值填入

4.上传app

我的appengine安装目录在D:\Program Files\Google下

运行cmd打开命令行窗口,进入 google_appengine目录 cd d:\program files\google\google_appengine

执行 appcfg.py update gtap

这个过程中需要输入gmail帐号和密码,输入密码时,电脑是不显示的,输入完毕,回车即可。回到起始目录时表示上传完毕

5.oauth验证

访问http://yourid.appspot.com/ 点击sign with twitter图标链接twitter认证

认证完成后,会出现让你修改API的页面,此处的密码可随意设定,这是API的密码

不过某些诸如mixero需要api密码和twitter密码相同才可以

这里只是我用来备忘的,如果需要更详尽的方法,请参考用GAE搭建自己的个性化推҉特҉API,方法有点不同,不过介绍的更直观方便

Related posts:

  1. 黑莓 foursquare
  2. oauth后ubertwitter上twitter方法
  3. 谷歌
  4. 啵一个
  5. twitter感想

About backkom

崇尚自由,共享,互助的猪 涉猎较广,无一精通;不求甚解,不懂装懂;知其然不知其所以然的猪 生活在现实与幻想的边缘,追求完美,特立独行的猪 偶尔脾气,好吃懒做的猪
This entry was posted in Backup, IT and tagged , , , , , , . Bookmark the permalink.

One Response to Gtap 0.4.1 搭建备忘

  1. Pingback: oauth后ubertwitter上twitter方法 | 米斯特猪

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>