Google app engineの覚え書き


今回は純粋に個人的な覚書です。

やりたいことは、twitterから送信される「フォローされましたよ」メールを受信して、フォローとお礼をかえすというもので、現状はCronを使用しているのだが、あまりにもtwitterのapiが頻繁にエラーを返すので、その対策としてアプローチを変えようと思った次第。

つまり、メールを受信してキックするようにすれば無駄なapiへのアクセスが減るのではないかと。。。

以下は、関連する情報のURLをだらだらとメモっているだけです。

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

関連する記事

One thought on “Google app engineの覚え書き

  1. Hey there, I think your website might be having browser compatibility issues. When I look at your blog site in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping. I just wanted to give you a quick heads up! Other then that, awesome blog!

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です

*

次のHTML タグと属性が使えます: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>