竹枝

Tag: GAE

让Twitter tools用上Twitter API proxy

by anyshpm on Feb.05, 2010, under 旅程

博客放在国内,怎么让wordpress访问twitter呢?

使用Twitter API proxy就可以了。

让博客通过Twitter API proxy访问twitter。

wordpress的插件很丰富,肯定有一个适合的Twitter插件。

看上了Twitter tools,可貌似它不支持Twitter API proxy。

怎么办呢?

自己动手,丰衣足食啊。

找到twitter-tools.php文件中的:

1
2
3
4
5
6
define('AKTT_API_POST_STATUS', 'http://twitter.com/statuses/update.json');
define('AKTT_API_USER_TIMELINE', 'http://twitter.com/statuses/user_timeline.json');
define('AKTT_API_STATUS_SHOW', 'http://twitter.com/statuses/show/###ID###.json');
define('AKTT_PROFILE_URL', 'http://twitter.com/###USERNAME###'); 
define('AKTT_STATUS_URL', 'http://twitter.com/###USERNAME###/statuses/###STATUS###'); 
define('AKTT_HASHTAG_URL', 'http://search.twitter.com/search?q=###HASHTAG###');

用Twitter API proxy地址替换twitter.com即可。

我在GAE上搭建的Twitter API proxy可供大家免费无偿使用。

1
2
3
4
5
6
define('AKTT_API_POST_STATUS', 'http://anytwitter.appspot.com/api/statuses/update.json');
define('AKTT_API_USER_TIMELINE', 'http://anytwitter.appspot.com/api/statuses/user_timeline.json');
define('AKTT_API_STATUS_SHOW', 'http://anytwitter.appspot.com/api/statuses/show/###ID###.json');
define('AKTT_PROFILE_URL', 'http://anytwitter.appspot.com/api/###USERNAME###'); 
define('AKTT_STATUS_URL', 'http://anytwitter.appspot.com/api/###USERNAME###/statuses/###STATUS###');
define('AKTT_HASHTAG_URL', 'http://anytwitter.appspot.com/api/search?q=###HASHTAG###');
1 Comment :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...