GoogleAppEngine / Python環境で、TwitterのOAuthを使ってみた。 1. TwitterのAPI利用申請 Twitterのアカウントを取得し、API利用申請をします。 Twitterのアカウントを取得します Twitterにログインします 以下のアドレスにアクセスします https://twitter.com/apps 新しいアプリケーションを追加をクリックします アプリケーションの情報を入力して登録します ※コールバックURLは、GAEのIDがXXXの場合は、http://XXX.appspot.com/oauth/twitter/callback とします。 以下の2つの値をメモします Consumer key pQcelwAEib60BhEoE52*** Consumer secret ******* 2. サンプルアプリをデプロイ すぐ動作するサンプル
This webpage was generated by the domain owner using Sedo Domain Parking. Disclaimer: Sedo maintains no relationship with third party advertisers. Reference to any specific service or trade mark is not controlled by Sedo nor does it constitute or imply its association, endorsement or recommendation.
”なる4”の騒ぎの件で、「OAuthの危険性がわかっているのか?twitter関連アプリの作者は何でもできるんだぞ。たとえば、DMは見放題送り放題だ」という意見を良く見かけるのですが、誤解を招く表現なので、twitterクライアント作者の立場から捕捉しておきます。 (TwitterにおけるOAuth認証についての話です。本文の記述から判別できるとは思いますが、念のため。他サービスの場合、事情が異なってくる場合があります) 少なくともデスクトップで動作するアプリは、これらのリスクは(比較的)低い もちろんスパイウェア等は、この限りではありません。 OAuth認証の流れを図にしてみました(あくまで「おおまかな」図です。色々と、端折っています)。 うだうだと書かれていますが、大事なのは「アクセストークン」です。これさえ覚えてもらえれば、他は全て忘れてしまってかまいません。 twitter関連アプ
意外と知らない人が多いので書いておく。 OAuth 認証において Consumer Secret の漏洩について心配している人が多い。 Twitter API で言うところの Application Type: Client なアプリケーションの場合。 特に、LL(Perl, Ruby, PHP, Python …)で配布する場合。 Consumer Secret は秘匿するべきもので、やはり漏らして良いものではない。 # まぁ、知らないアプリケーションの問い合わせが来ても自己責任だけどね :P そのため、現状ではユーザーごとに Consumer Secret を取ってもらうしかない。 それを改善する手段として、現在 OAuth WRAP/2.0 という仕様が策定されている。 要はリクエストトークンが不要になる。イコール、Consumer Secret も不要になる。 Twitt
OAuth の Read と Write 先日, ツイート君に会話をまとめてもらい, 大変嫌な思いをした. Twitter の OAuth には Read 権限と Write 権限があって, Write 権限があると つぶやく 誰かをフォローする 誰かをリムーブする などのことが行えてしまう. つまり, Write 権限を要求するアプリケーションを許可することは, 「このアプリケーションが私のアカウントを使って勝手に変なことをつぶやいたり, 勝手に誰かをフォローしたり, 勝手に誰かをリムーブしても文句は言いませんよ」ということに等しい. さて, それでは OAuth の権限付与画面を見てみよう. ここでは冒頭に上げたツイート君が権限をこちらに要求してきている. では, いったい何の権限を要求してきているのだろうか. Read なのだろうか. それとも Write なのだろうか. 答えは R
2020/10/18 エンジニア D4DJ Groovy Mix オープンベータ開始 2020/10/18 DJ 秋葉原(を夢見る)パラダイスレイディオ Vol.1 @ twitch配信 2020/10/25 エンジニア D4DJ Groovy Mix リリース 2020/11/14 DJ UNDER Freaks 2nd anniv. @ 渋谷Cafe W (渋谷WOMB 1F) 大手アパレルメーカー「ユニクロ」のキャーンペンサイト「Uniqlo Lucky Line」で発生した漏洩騒動をまとめてみました 「行列なう」しちゃった人は、「なにがあったの?」と「どうしたらいいの?」の項目をとりあえず読んで下さい。 なにがあったの? 応募したユーザーのTwitter IDとツイートが書かれたテキストファイルが漏洩した 漏れた範囲は応募者全員。現在は「最初の400人」と「直近の400人」の計80
Twitterユーザー、あるいはこのプラットフォームを利用しているデベロッパーや企業は、2010年6月30日に向けて適切な対応を図る必要がある。Twitter APIのBASIC認証が廃止されるためだ。 意外と知られていないこととして、APIの制限のほかにユーザーごとの制限があると丹羽氏。1日当たりのツイートやフォロー、ダイレクトメッセージなどに上限があるが、ダイレクトメッセージの250件/日制限に引っかかってはじめてそれに気付く企業アカウントも少なくないという 「Twitter Development Talk(Twitter-Dev)」や「Twitter API Announcements」などではかなり前からアナウンスされていたが、2010年6月30日を最後に、Twitter APIのBASIC認証はエラーが返ってくるようになる。一見地味に映るこの出来事だが、カウントダウンサイトも用
どうも。昨日もちょっと twitter に触れましたが、今日も twitter ねたです。 前の post で、チラッと触れた OAuth 認証 (O認証認証みたいでこわい) を使ってみたくなり、自分で 0 から書いて見ました。 既存のライブラリ使えば手っ取り早いですが、仕組みを理解したかったので、やってみるだけやってみました。 結果から言うと、ものすごく面倒です。すごい時間かかりました。 (僕の文章読解能力と、typo 検出能力と、プログラミングスキルが足りなかっただけかもしれないけど) まあ、これの実装については、各所で結構触れられていますが、まあ話を聞いただけじゃイマイチピンとこないものだったのですが、いざ実装してみたらよくわかりました。 OAuth の仕組み OAuth の仕様については、oauth.net の Documentation に書いてあるとおりです。 OAuth Co
2009年11月23日月曜日 OAuthで認証してTwitterでつぶやいてみた 先日の記事で取り上げたTwiticaを、OAuthでの認証に対応してみました。 JavaとかPerlとかPythonとかRubyとかC#ではサンプルがさくっと見つかったりライブラリがあったりするのですが、C++は見つからず。C++/CLIなら.Net用のものが使えるみたいですが。しかしTwiticaがネイティブC++で書かれているので、そのまま貫き通します。 OAuthの手順 下記の記事は大変参考になりました。ありがとうございます。 『xtra/OAuth1.0』- irevo labs (OAuth仕様書の日本語訳) 『twitterでOAuthを使う方法(その1:認証まで)』 - てっく☆ゆきろぐ 『twitterでOAuthを使う方法(その2:前回の続き〜APIにアクセスしてみる)』 - てっ
最近は Launchy から twitter へ投稿しているのだけど、その時 via API となるのが気に入らなかったので、認証に OAuth を使いクライアント名を変更する事にした。ところでいつから from API じゃなくなったんだ? OAuth については @IT や gihyo.jp の記事を読んだ。OAuthについて知らなければ目を通しておこう。 スクリプトにはいつも通り Python を使用する。ただし今回は Launchy からの投稿、すなわち Windows 環境で行う事になる。とはいっても普段使ってる Linux とはライブラリのインストールの仕方がちょっと違うだけだろう。 用意するもの 1) twitter へのアプリケーションの登録 2) simplegeo’s python-oauth2 at master – GitHub まず twitter へアプリケ
はじめに 最近「フォロワー1000人目指そう」とか #followmejp とかつながりたがる流れが多いけど、TwitterのTLがあふれちゃうとやる気なくしちゃうことが前にわかったので縮小の方向に進めてます、こんにちは。 また最近はOAuth推奨っぽいのでOAuthでfollowingを管理するスクリプトを書きました。 参考 Twitter API を OAuth で認証するスクリプトを 0 から書いてみた - trial and error ほぼここのパクリ。あざーっす。 Pythonでの、Pitの使い方 世界一わかりやすいムービー付き - When it’s ready. (a2c.get.diary) スクリプトをそのままcommitできるようにpit使い始めました。id:a2cさんありがとうございまっす! Twitter Developers 当然TwitterのAPIは読むでし
Twitterの認証方式について Twitterの認証方式にはOAuthとBasic認証の二通りの仕組みがあります。 Twitter API Wiki / Authentication Basic認証はお手軽なので、世に存在するTwitter APIを利用する一般的なクライアントは、大抵がこちらの方法を使っているのではないかと思います。 ですが、実はこのBasic認証はセキュリティ上の理由から、将来的に非推奨になることが予告されています。 Twitter API Wiki / OAuth FAQ 既にTwitter API Wikiでは「今後作成するクライアントはOAuthを利用することを強く推奨する」と表明されており、それに応じてOAuthを使うクライアントも増えてきています。 …が、現状Basic認証を利用しているクライアントが既に大量に存在していることを考えると、今日明日でBasic
最近、がしがしこれ書いてました。 って、中身は大したことないんですけどね。 ライブラリ名は長いと困るので、無理やり短縮しました。 クリスマスに間に合わせようと思ったのですが、ちょっと間に合わなかったようです。 詳しいことはこっちに書きます http://www.techno-st.net/wiki/Python-twoauth 概要としては... Python 向けの OAuth にしか対応してない Twitter ライブラリ Python の標準ライブラリだけで作られている API のほとんどのメソッドが使える。 XML をほぼそのまま辞書 (dict) に変換して返してくれる。 こんな感じです。 興味のある人は使ってみてくれてもいいですが、まだドキュメントとか何もそろってません。 僕からの、クリスマスプレゼントということで... たぶん、なくても、普通にサンプル見れば使える
Twitter APIのBASIC認証は2010年6月に「廃止予定」(→8月まで延長)(→廃止された模様) 2010年01月05日 11:51Twitter 昨年12月にパリで開催されたインターネットのイベント LeWeb’09 で Twitter のプラットフォームディレクターの Ryan Sarver さんが登壇して いくつかの発表を行ったらしいんだけど その中にこういうのがあった。 Twitter Spawned 50,000 Apps To Date, Will Open Up Firehose For More starting Basic Auth decprecation in June 2010. 2010年6月から Twitter API の BASIC 認証が deprecated になるとのこと。 Deprecated というのは「非推奨」「廃止予定」という意味で こ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く