#This page is for users who want to setup their own API proxy
Introduction
Twip is an API proxy...Well, if you go to this page then maybe I don't need to explain what's API proxy :-)
For any client developer, If you have problem setting up an API proxy, please contact
. I'll be glad helping you add API proxy support in your app :-)
ATTENTION: comments on this wiki page is ignored. Please report to issues page if you have any problem :-)
HOWTO setup a twip API proxy
Get your OAuth Consumer Key/Secret
You can get your OAuth Consumer Key/Secret at http://twitter.com/apps/new
- Application Type: Browser
- Callback URL: You can fill anything here. Twip will handle it properly :-)
- Default Access type: Read & Write
The other fields is upon to your choice :-)
Step-by-step Guide
Updated for twip-4.0.2-r152
- SVN checkout the source code: svn checkout -r152 http://twip.googlecode.com/svn/trunk twip or download twip-4.0.2-r152.tar.gz
- edit config-example.php, define OAUTH_KEY/OAUTH_SECRET/BASE_URL. For BASE_URL, if your twip directory can be accessed from http://example.com/twip/, then BASE_URL should be http://example.com/twip/ ( the last slash MATTERS!!! ). If you want to compress the contents using gzip, change the "COMPRESS" to "TRUE". Rename it to config.php
- Edit nginx.conf or lighttpd.conf if you are using nginx or lighttpd as web server for those web servers have to manually set rewrite rules. Rules can be found in rewrite_rules.txt
- Go to BASE_URL, you can choose to get API proxy URL in O mode or T mode.
HOWTO setup your clients to use twip
These terms will be mentioned:
If you set up an API proxy at http://example.com/twip4/
- BASE_URL:http://example.com/twip4/ NOTE:the trailing slash '/'
- RAW_BASE_URL:example.com/twip4 NOTE: without the trailing slash
- You can get your O mode API proxy URL from twip4's configuration page, that's your O_MODE_URL.
| Application | Platform | O Mode | T Mode |
| Twitter for iPhone | iOS | Yes | No |
| Twigee | Android | Yes | Yes |
| Twhirl | multi-platform based on Adobe AIR | Yes | No |
| Chromed Bird | multi-platform based on Google Chrome Extensions | Yes | Yes |
| TwitBird for iPhone | iOS | Yes | No |
Twitter for iPhone
Only O mode is supported.
- API Root: O_MODE_URL
- Search API: O_MODE_URL
Your username/password is ignored when using o mode,so you can input anything.
Twigee
Both O mode and T mode is supported in theory, but only T mode is tested.
Get API proxy URL of T mode at BASE_URL.
Twhirl
Only O mode is supported.
Go to BASE_URL and choose O mode, twip will give you an API proxy URL.
Use it when adding l.ca account in twhirl, using username@RAW_BASE_URL/1 as the screen name.
When asked to enter the password,type anything.
Chromed Bird
TwitBird for iPhone
Note: due to the limitation of TwitBird, only O mode is supported and only one user is supported.
In setting page -> API proxy:
- Twitter Proxy: O_MODE_URL/1/
- Twitter Search Proxy: O_MODE_URL
这个版本不能限制使用用户?
gravity应该怎么改呢
twitter for iphone用得很好!感谢!!
我用的gravity直接使用o模式api可行
twitter for iphone 是怎么用的啊?我一直没有成功。
主要是申请consumer key&secret的时候,不知道 http://api.twitter.com/apps 里怎么设置,比如Application Type该选择Browser吗?Callback URL该如何设置?User Twitter for login是什么意思?该选上吗?
godaddy的空间上传后修改完参数打开BASE_URL得出的是空白的页面(linux空间)
godaddy空间上面打开BASE_URL得出空白页面的原因查明,是因为服务器优先读取index.php而不是index.html导致的
选中O模式进去,认证时候框里不管填什么,都会出现以下错误: Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found in XXX\twip\include\twitteroauth.php on line 60
laoyebin:Base_URL里面,你最后少了个/,斜线。
求助达人。 选中O模式进去,认证时候框里不管填什么,都会出现以下错误: Fatal error: Call to undefined function curl_init() in /www/xxx.org/t/w/i/xxx/htdocs/twip/include/twitteroauth.php on line 199
谢谢
楼上一样问题,config.php中的base_url,网址后面少了一个“/”,斜线。
alwaysdata空间使用r152认证成功获取API地址,O模式,在Gravity6375版使用时无法刷新TL,发推显示API达上限,可通过其他客户端验证改推已发出,不知何故?
TO yuqizhang: 谢谢。'/'我一直加的,貌似不行,yegle回复我的邮件说空间不支持。是zymic.com。
貌似不支持seesmic
TO yuqizhang: MD,忘记了,用了个Window的主机。谢谢回复,呵呵
請問Oauth文件夾的權限必須為777嗎?
在alwaysdata建的,认证成功,但是在客户端登陆就显示“org.json.JSONException:A JSONObject text must begin with '{' at character 0 of” 我除了改了config.php没有修改什么东西啊,错在哪里呢
在我的空间上搭建怎么老提示403啊,在那个GETAPI一步那里
有几个问题: 1 在Twitter的API设置里面,Callback URL应该填xxx.xx/twip/oauth.php吗? 2 是不是在OAuth之前要把/twip/oauth目录权限设到777?没设置权限的话会有问题吗?
我的症状是可以生成T或者O模式的API,但是访问任何一个都说404 - Page not found。我用的是Twip 4。
Very nice!
文档好少。完全弄不明白怎么用。。。。。
装了,twitBird for ipad和Twidroyd在o模式下都可以用
Fatal error: Call to undefined function curl_init() in /www/xxx.org/t/w/i/xxx/htdocs/twip/include/twitteroauth.php on line 199 并不是base_url中斜线的问题 斜线加过了 还有http://example.com/twip/进不去 我是通过http://example.com/twip/index.html进去的
O模式提交认证返回报 Could not connect to Twitter. Refresh the page or try again later. Error code:0
用TwitBird2?.7遇到问题,试了好多次之后发现:
架好TWIP4之后,在客户端登陆无论是T还是O模式都是提示“No input file specified. ”,直接进入twip返回的网址也是只有No input file specified. 请问是什么问题 我的主机是Nginx,已设置rewrite_rules
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@qdoo.tk and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument? to handle the request. Apache Server at qdoo.tk Port 80
这个是什么情况?T或O都是这样
解决了,删了那个.htass什么的就好了
Echofon for Firefox的配置: 修改nsTwitter.js,TWITTER_API_URL的值改为O_MODE_URL即可
从昨天开始杯具了,twip被墙。
me too, 昨日被墙
我的也无法访问了 研究了下 不是被墙了 应该是关键字TCP重置了
ECHOFON如何配置呢?我这边无论O_MODE_URL还是BASE_URL都不行。Twhirl倒是正常工作
alwaysdata搭建成功,T不可以,O可以,但帐号运行不到半天 就Account suspended了,私用而已啊
zobyhost不能直接打开zobyhost.com/twip/ zobyhost.com/twip/oauth.php 无法认证,出现: Could not connect to Twitter. Refresh the page or try again later. Error code:0
提交oauth认证时是不是一定得在墙外呢?
有没有试过Seesmic上面用过的,麻烦吱一声~
注意twip的安装环境除了curl外还需要php的json扩展。apache等web服务器还需要开启全目录.htaccess!
seesmic on android是成功的,注意/号,注意用户名不能用邮箱,密码则是架设twip3时oauth后设置的密码。貌似seesmic不支持twip4这么长的url,我用的是twip3,希望对各位有所参考。
#twip 在 #godaddy 空间打开空白的解决办法找到了: 直接输入首页地址:http://youdomain/twip/index.html 不能仅仅输入 http://youdomain/twip/
@mcxiaoke
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@gl.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument? to handle the request. Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage?/5.0.2.2635 Server at www.gl.com Port 80
我也遇上了这个问题,但是似乎没有办法按照 ufoismey3k 说的那样解决呢
Can u english ?
用ubertwitter for blackberry 老是 network error 怎么设置网络啊?
终于搞定ECHOFON了 新版ECHOFON 的TWITTER_API_URL的值改为O_MODE_URL 没错 注意不要加http:// 这个前缀 就可以了
Fatal error: Call to undefined function curl_init() in /www/xxx.org/t/w/i/xxx/htdocs/twip/include/twitteroauth.php on line 199
解决办法:安装phpX-json (5.2+含)及phpX-curl
OAuth提交认证后产生空白页面,没有任何提示,是怎么回事啊?
OAuth提交认证后产生空白页面:apt-get install php5-curl
For twip-4.1-r184: You need to modify .htaccess in order to make it work.
<IfModule mod_rewrite.c> # Change /twip/ to your subdirectory, or / if it's root RewriteBase /twip/ RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php [L] </IfModule> # Add this line for default page to work DirectoryIndex index.html黑莓可以用吗
Could not connect to Twitter. Refresh the page or try again later. Error code:0.Don't report bugs or issues if you got this error code.Please try a paid virtual host.
成功用了手机版,来感谢一下,正好谷歌APP也挂了。
选中O模式进去,认证时候框里不管填什么,都会出现以下错误: Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found in XXX\twip\include\twitteroauth.php on line 60
seesmic on android 怎么试都不成功,twip3怎么设置?原来用gtap的API一直好好的,可恨的GFW封掉了appsopt.com
hotot用O mode,可以看,发推时要求输入用户名密码,不知道应该输什么
不知道为啥,在我mixero上使用正常,但是在我的twitter for iphone上能收推,但是发不出去推
不知为什么 在我mixero上使用正常 但手机上的 ubertwitter 和twibble 用不了
TwitBird?的follow按钮一直loading是怎么回事呢?我哪里设置不对吗?我用的是twip 4.
真帅啊,太帅了,几乎我们需要API的地方都能使用twip4,赞!!
严格按照你的说明书做了, 但就是登不上 twigee 客户端. 不知为何. 错误 ...oauth/request_token...
总是提示错误 .../t/oauth/request_token?oauth_callback=oob
为什么我在oauth验证的那一步,点击了提交验证,然后就是无法载入了: chrome显示: 服务器错误。 网站在检索 http://xxxxx/oauth.php?type=1 时遇到错误。 该网站可能关闭进行维护或配置不正确。 我使用的是BurstNet?? VPS + Ubuntu 10.04
模拟验证报错如下: Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/users/ruiofyzd/temp:/users/ruiofyzd/www) in /users/ruiofyzd/www/twip/oauth_proxy.php on line 41
Warning: curl_setopt() [function.curl-setopt]: open_basedir restriction in effect. File() is not within the allowed path(s): (/users/ruiofyzd/temp:/users/ruiofyzd/www) in /users/ruiofyzd/www/twip/oauth_proxy.php on line 44
Warning: Cannot modify header information - headers already sent by (output started at /users/ruiofyzd/www/twip/oauth_proxy.php:41) in /users/ruiofyzd/www/twip/oauth_proxy.php on line 96
Warning: Cannot modify header information - headers already sent by (output started at /users/ruiofyzd/www/twip/oauth_proxy.php:41) in /users/ruiofyzd/www/twip/oauth_proxy.php on line 97
Warning: Cannot modify header information - headers already sent by (output started at /users/ruiofyzd/www/twip/oauth_proxy.php:41) in /users/ruiofyzd/www/twip/oauth_proxy.php on line 98
API建好了,在twitter fo iphone 上可以登录,但刷新timeline的时候显示 start tag expected '<'... 这是什么原因?
API建好了,在twitter fo iphone 上可以登录,但刷新timeline的时候显示 start tag expected '<'... 这是什么原因?
我也有这个问题
在验证那一步,已经出现了twitter界面的ACCESS,然后就403 Forbidden了,咋整?
Fatal error: Call to undefined function curl_init() in /...../twip/include/twitteroauth.php on line 199
我也出现问题了。这是怎么回事呢?是因为没安装json和curl的缘故么?
在twidroyd下面试验了o模式成功,t模式不成功。o模式下也是多次才成功的,大家多试几次,手机的网络差,很有可能不成功
请问,我已经修改并上传至空间了,采用O模式,选择Oauth验证,自定义 URL 地址旁边的空白框需要填入什么吗?点击“提交验证”后弹出一个对话框要求输入用户名和密码,这里输入twitter的吗?
输入http://BASE_URL/o/Herkuang/87W126/1/statuses/public_timeline.json 出现: Notice: Undefined property: twip::$api_type in /var/www/twiapi/twip.php on line 165 下面json是对的。
出现Error 401 TwitterOAuth Object ( http_code? => 401 url? => https://api.twitter.com/oauth/access_token?oauth_consumer_key= ........... 收费空间nginx php... 换了2次还是不行...
无论怎么弄都是Fatal error: Call to undefined function curl_init() in ..../twip/include/twitteroauth.php on line 199
Android上Seesmic O模式工作正常.
O模式成功应该算成功吧~oauth文件夹里文件也生成了,但是tweetdeck用不了根本进不去。。。。如果把O模式生成的API直接打到地址栏去会出现click HERE to get your API url
这个啥情况?一点here就又跑要求认真那画面去了。。。。。。。。
搭建总出现 Error 401 TwitterOAuth Object, 没法生成 oauth 文件 想了一下,oauth 只是取 token,而注册API时会给一个私有的Access Token(测试过可以直接用) 于是想到自己写 oauth 文件应该也可以用,于是想请教 yegle: oauth 文件夹下的 .oauth 内容是怎样的格式?
成功安装,谢谢!
我觉得现在这个工具已经快失效了,我接连建了两个TWPI4的api,都在几天之内挂掉,翻墙访问API没问题,直接访问就被直接重置……
访问T或O模式的设置界面时出现的是网站自己的404页面怎么办呢?
请问GRAVITY应该怎样用呢?将得到的API地址写进去,也不能正常连接
4.1版,o模式,已经通过了twitter的验证,但跳转到getapi.php时出错
403 Forbidden You don't have permission to access /xxxx/getapi.php on this server.
我搭建twip完毕,但是不知道在twigee中如何设置
twigee中添加帐号,输入twitter帐号密码, API输入twip中o模式给出的API Proxy地址(没有地方输入Image Proxy) 然后点击确定
之后提示一个错误,太快了,看不清,只看到个401
访问被重置的请修改api目录的名称,如果url包含twip的话连接会被重置
搭建twip都很顺利,也能顺利获得proxy的URL,但是浏览器访问这个URL的时候,只出现下面一句话 click HERE to get your API url 点击HRER链接又回到twip的主界面了。有知道的朋友帮忙解决一下吗?顺便说下,我的twip所在目录名已经改成其他名称了,是否跟这个有关系?
自己回答自己的问题吧,其实是我理解错了,出现click HERE to get your API url 表示proxy url已经正常。至今配到客户端用就是正常的
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/s/.hut2.ru/WWW/twip/include/twitteroauth.php on line 17 语法错误?能帮改一下吗?
你好,我用的是SSL。把TWIP目录修改成了HELLO,Callback URL地址设置成https://xx.NET/HELLO/,在空间的Config的basicURL也设置成了https://xx.NET/HELLO/,但是每次从Twitter返回的时候总是该页无法显示,请问是怎么回事,这个API已经能用到其他地方了,就是不能用到TWIP上
我用godaddy的免费空间,Windows主机,上传上去,选择O模式,提示这个:
Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found in D:\Hosting\5561174\html\twip\include\twitteroauth.php on line 60
有加'/'了。
如果只使用T模式,是否还需要主机支持curl?
用O模式模拟oauth生成API成功但是直接访问无法打开页面,在客户端里也显示API地址无效
出现 Fatal error: Call to undefined function curl_init() in /data/multiserv/users/574169/projects/1418875/www/twip/include/twitteroauth.php on line 199 "/"也加了,但是一样。不知道该怎么办了。请教。
use trim ( strip_tags ( $str ) to filter out godaddy's AD , so u can establish one twip in godaddy's free php linux hosting.
出现 Fatal error: Call to undefined function curl_init() in /data/multiserv/users/574169/projects/1418875/www/twip/include/twitteroauth.php on line 199 "/"也加了,但是一样。不知道该怎么办了。请教。
Fatal error: Class 'OAuthSignatureMethod_HMAC_SHA1' not found in E:\XXXX\web\twip\include\twitteroauth.php on line 60
Gravity用O模式可以读推,但发推时返回“wrong username/password.”
为什么我在认证是一直无法载入啊 求指导
使用image代理的时候: The image proxy needs POST method.
我觉得这个 Wiki 的质量非常之差。看到 N 个错误。
在VPS Centos6 上安装成功 网页可用打开 运行o认证成功了 但是在客户端上设置API就出错 apache的log显示这个 File does not exist: /srv/www/XXXXXXXXXXX/public_html/o 求指导
验证时仍是此问题 Fatal error: Call to undefined function curl_init() in /www/xxxx.com/k/a/r/xxxx/htdocs/twip/include/twitteroauth.php on line 199 看过之前的解决办法都没有用,请问如何解决?要安装 php json 和 php curl 吗? 谢谢
在Oauth验证页面提交认证,页面报错:网站在检索 http://***.byethost12.com/twip/oauth.php 时遇到错误。 该网站可能关闭进行维护或配置不正确。HTTP 错误 500(Internal Server Error):服务器尝试执行请求时遇到了意外情况。下载的twip-4.1-r196,按照twip4教程来做的。请问应该怎么办,谢谢。
我也是Fatal error: Call to undefined function curl_init() in /..../twip/include/twitteroauth.php on line 199 请问如何安装 php json 和 php curl ??
Fatal error: Call to undefined function curl_init() in /data/multiserv/users/813429/projects/1933764/www/news/include/twitteroauth.php on line 199
坑爹啊 难道是传说中的没curl,,那位能给个支持twip4的不被墙的免费主机,好多免费空间都被墙了,不被墙的就是不支持twip4的,支持的基本都墙了,除了内部使用的
Error 401 TwitterOAuth Object ( http_code? => 401 url? 生成不了