RedTea / gtap

Automatically exported from code.google.com/p/gtap
1 stars 2 forks source link

OAuth支持 #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
昨晚ep给代码加上了oauth支持,不过现在的身份验证方式比较�
��琐,作者可以考虑改
进一下。

现在的用法是这样的:
1. 注册OAuth,把OAuth的callback url设置为https://xxx.appspot.com/oauth
/twitter/callback
2. 把OAuth的key和secret填入oauth.py
3. 改好app.yaml之后上传到GAE
4. 
访问https://xxx.appspot.com/oauth/twitter/login注册,完成后会显示一�
��key
5. 
设置客户端的api地址为https://xxx.appspot.com/gtap_oauth/,用户名随
意,密
码为(4)显示的key即可登录

我测试过获取/发推/删除推都没问题,不过不确定还有没有其
它bug,请慎用。

(oauth.py原始作者为tav 
(http://github.com/tav/tweetapp/),我作了部分修改)

Original issue reported on code.google.com by SAPika...@gmail.com on 20 Apr 2010 at 3:32

Attachments:

GoogleCodeExporter commented 9 years ago
用来用去就你这个可以用。。gtap都已经可以改key了。。但是�
��是不能用=。=

Original comment by Napbonk...@gmail.com on 14 Aug 2010 at 11:48

GoogleCodeExporter commented 9 years ago
有谁能发个完整的教材吗?

Original comment by xzz0...@gmail.com on 18 Aug 2010 at 8:21

GoogleCodeExporter commented 9 years ago
囧一个喵~乃这个只能支持单用户吧喵~咱写了一个支持很多用
户滴Bot OAuth端喵~不过……API部分处理不是很给力喵……

项目地址:  http://code.google.com/micro-bots

希望能有帮助喵~

Original comment by ncwh...@gmail.com on 18 Aug 2010 at 11:43

GoogleCodeExporter commented 9 years ago
呃。。。这个是可以支持多用户的,除非在配置里面设置了

#252: http://4zai.net/179

Original comment by SAPika...@gmail.com on 18 Aug 2010 at 11:57

GoogleCodeExporter commented 9 years ago
为什么gtap 
0.4版无法用在chrowety。。。而这里这个版本可以啊?

Original comment by Napbonk...@gmail.com on 24 Aug 2010 at 9:26

GoogleCodeExporter commented 9 years ago
我按使用说明里改了app.yaml以后用Google App Engine 
Launcher上传,输了邮箱和密码弹出一个类似记事本的对话框,显�
��2010-08-28 03:38:14 Running command: "None",这是什么情况?

Original comment by JohnPen...@gmail.com on 27 Aug 2010 at 7:39

GoogleCodeExporter commented 9 years ago
Running command: "None" 的情况我也碰到了, 等很久没反应. 
传说上传成功以后会提示可以关闭窗口, 
而且时间不会超过5min

所以最后我用SDUpload上传的..= =

Original comment by abc.Kira...@gmail.com on 28 Aug 2010 at 7:18

GoogleCodeExporter commented 9 years ago
twitter for android 1.0.3 
版本如何修改内置API能够使用啊,已经成功配置了GTAP0.4,OAUT
H也已经验证通过了。
以前是
替换http://twitter.com/为http://XXX.appspot.com/
替换http://www.twitter.com/为http://XXX.appspot.com/
替换http://api.twitter.com/为http://XXX.appspot.com/api/
替换http://search.twitter.com/为http://XXX.appspot.com/search/

1.0.3显然不行了,不知道有没有方法修改成功还是根本不能修
改了

Original comment by Symore...@gmail.com on 30 Aug 2010 at 5:53

GoogleCodeExporter commented 9 years ago
在tweetdeck上能收但是发不了推,什么情况?

Original comment by cqcheru...@gmail.com on 2 Sep 2010 at 1:36

GoogleCodeExporter commented 9 years ago
能推,发了一定要开xx门才能登上TweetDeck,不管是收还是发都
要开,原来不能发的时候是可以正常收的,不用开,有没有��
�决的办法

Original comment by cqcheru...@gmail.com on 2 Sep 2010 at 2:47

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
我使用birdnest建的API。没用oauth,以前都可以正常登录,前几�
��开始无法接受和发送推的。请高手指点。

Original comment by sunjiali...@gmail.com on 3 Sep 2010 at 3:26

GoogleCodeExporter commented 9 years ago
求助:
原来申请了个apI,birdnest的,现在不能oauth登陆了,却总是上�
��错误,求高手指教!报告在文末。
API是原有的,twitter oauth已申请。

问题报告如下:
2010-09-03 10:40:38 Running command: "['C:\\Python26\\pythonw.exe', '-u', 
'C:\\Program Files\\Google\\google_appengine\\appcfg.py', '--no_cookies', 
u'--email=cegceo@gmail.com', '--passin', 'update', 'D:\\SDUpload\\gtap']"
C:\Program Files\Google\google_appengine\appcfg.py:41: DeprecationWarning: the 
sha module is deprecated; use the hashlib module instead
  os.path.join(DIR_PATH, 'lib', 'antlr3'),
C:\Program 
Files\Google\google_appengine\google\appengine\tools\dev_appserver_login.py:33: 
DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
Application: XXXX; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
2010-09-03 10:40:47,375 ERROR appcfg.py:1350 Invalid character in filename: 
使用说明及注意事项.txt 
Initiating update.
Password for cegceo@gmail.com: Error 403: --- begin server output ---
You do not have permission to modify this app (app_id=u'XXXX').
--- end server output ---
2010-09-03 10:40:50 (Process exited with code 1)

You can close this window now.

Original comment by ceg...@gmail.com on 3 Sep 2010 at 5:05

GoogleCodeExporter commented 9 years ago
256, 257
试试重装一下python?
-----------------------

258
新版貌似是内置oauth了,所以应该是不支持了
--------------------------------

260 
可能是gfw问题,你试试加hosts然后改用https?方法可以参考 
http://code.google.com/p/gtap/issues/detail?id=21 comment #2
----------------------------------

263
这里是gtap的项目页。。。
---------------------------------

264
app.yaml里面的appid要改成你自己的

Original comment by SAPika...@gmail.com on 3 Sep 2010 at 5:31

GoogleCodeExporter commented 9 years ago
谢谢265,SAPikachu,ID是我的,这里影藏了下,换成XXXX。error 
403怎么解?

Original comment by ceg...@gmail.com on 3 Sep 2010 at 6:19

GoogleCodeExporter commented 9 years ago
这错误是appid不对,核对下app.yaml里面的id和控制面板的id有没
有不同?包括大小写

Original comment by SAPika...@gmail.com on 3 Sep 2010 at 6:42

GoogleCodeExporter commented 9 years ago
折腾了一天还是卡在上传,只好来这里问,上传时提示

C:\Program Files\Google\google_appengine>appcfg.py update d:\gtap
C:\Program Files\Google\google_appengine\appcfg.py:41: DeprecationWarning: the s
ha module is deprecated; use the hashlib module instead
  os.path.join(DIR_PATH, 'lib', 'antlr3'),
C:\Program Files\Google\google_appengine\google\appengine\tools\dev_appserver_lo
gin.py:33: DeprecationWarning: the md5 module is deprecated; use hashlib instead

  import md5
Application: xxx; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
Initiating update.
Error 404: --- begin server output ---
This application does not exist (app_id=u'xxx').
--- end server output ---

其中xxx是我申请的app id 
,为什么会提示不存在呢,我直接访问xxx.appspot.com也是404错��
�但是在My Applications 里它是显示出来的,current 
version显示是None Deployed,这个404是哪来的呢

Original comment by feelsof...@gmail.com on 3 Sep 2010 at 7:38

GoogleCodeExporter commented 9 years ago
这个我也不太清楚。。。试试申请另一个appid?另外大小写也
要正确

Original comment by SAPika...@gmail.com on 3 Sep 2010 at 8:24

GoogleCodeExporter commented 9 years ago
为什么最后不能访问GAE程序地址,已经翻墙了,访问此地址��
�反应,http也一样。
https://jufeng854.appspot.com/oauth/twitter/login

Original comment by maoliang...@gmail.com on 3 Sep 2010 at 12:15

GoogleCodeExporter commented 9 years ago
有什么错误?

Original comment by SAPika...@gmail.com on 3 Sep 2010 at 1:02

GoogleCodeExporter commented 9 years ago
id前面有空格..... application: xxxx
写成 application:xxxx  不能通过

Original comment by ool...@gmail.com on 3 Sep 2010 at 1:17

GoogleCodeExporter commented 9 years ago
我的错误是这样的:

list index out of range
Traceback (most recent call last):
  File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 511, in __call__
    handler.get(*groups)
  File "/base/data/home/apps/xxx/1.344548291900880207/main.py", line 136, in get
    self.do_proxy('GET')
  File "/base/data/home/apps/xxx/1.344548291900880207/main.py", line 98, in do_proxy
    username, password = self.parse_auth_header(self.request.headers)
  File "/base/data/home/apps/xxx/1.344548291900880207/main.py", line 83, in parse_auth_header
    password = user_pass_parts[1]
IndexError: list index out of range

Original comment by ilvh...@gmail.com on 4 Sep 2010 at 3:39