PHPやJavaScriptなどの覚え書き、たまに愚痴、反省など。
Google app engineの覚え書き
今回は純粋に個人的な覚書です。
やりたいことは、twitterから送信される「フォローされましたよ」メールを受信して、フォローとお礼をかえすというもので、現状はCronを使用しているのだが、あまりにもtwitterのapiが頻繁にエラーを返すので、その対策としてアプローチを変えようと思った次第。
つまり、メールを受信してキックするようにすれば無駄なapiへのアクセスが減るのではないかと。。。
以下は、関連する情報のURLをだらだらとメモっているだけです。
- Receiving Email – Google App Engine – Google Code.
- Google App Engine/JRubyでTwitterの自動フォロー返し – しばそんノート.
- twitter api 仕様書(日本語訳)
- スタート ガイド: Python – Google App Engine – Google Code.
twitterからのメールのメールヘッダ
How should my bot follow users that follow it or inspect direct messages?
By default, Twitter sends an email the first time a user follows you or sends you a direct message. For your bot-building pleasure, we’ve added the following headers to those emails
- X-TwitterEmailType - will be ‘is_following’ or ‘direct_message’
- X-TwitterCreatedAt - ex: Thu Aug 07 15:17:15 -0700 2008
- X-TwitterSenderScreenName - ex: ‘bob’
- X-TwitterSenderName - ex: ‘Bob Smith’
- X-TwitterSenderID - ex: 12345
- X-TwitterRecipientScreenName - ex: ‘john’
- X-TwitterRecipientName - ex: ‘John Doe’
- X-TwitterRecipientID - ex: 67890
- X-TwitterDirectMessageID - ex: 2346346
| この記事は miya によって 2009 年 12 月 10 日 5:04 AM に投稿されました, 未分類 以下に保存されています。 RSS 2.0 を通してコメントをフォローする。 コメントを残すか、ご自分のサイトからトラックバックできます。 |
コメント無し
トラックバックはありません。
Additional comments powered by BackType
