<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Xauth on php-tips.com</title>
    <link>https://php-tips.com/tags/xauth/</link>
    <description>Recent content in Xauth on php-tips.com</description>
    <generator>Hugo</generator>
    <language>ja</language>
    <lastBuildDate>Fri, 30 Apr 2010 20:39:01 +0900</lastBuildDate>
    <atom:link href="https://php-tips.com/tags/xauth/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>tw2mvをTwitterのxAuthに対応させたメモ</title>
      <link>https://php-tips.com/2010/04/30/tw2mv_twitter_xauth_memo/</link>
      <pubDate>Fri, 30 Apr 2010 20:39:01 +0900</pubDate>
      <guid>https://php-tips.com/2010/04/30/tw2mv_twitter_xauth_memo/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.itmedia.co.jp/news/articles/1004/27/news063.html&#34;&gt;TwitterのBasic認証が6月末に終了&lt;/a&gt;するということで、やっとこさmixiボイスへの転送スクリプト&amp;quot;tw2mv&amp;quot;をxAuthに対応させてみました。&lt;/p&gt;
&lt;p&gt;&lt;small&gt;xAuthはOAuthの簡易版ですので、可能な限りOAuthで実装するのが筋だと思います。
ただ、本スクリプトはコマンドラインスクリプトのため、OAuthでWebの画面を開いて認証させるのは余計な手間がかかると判断しxAuthを採用しています。&lt;/small&gt;&lt;/p&gt;
&lt;h3&gt;1. Twitterへのアプリケーション登録&lt;/h3&gt;
&lt;p&gt;通常のOAuth利用と同じく、ConsumerKeyが必要なのでアプリケーションの申請を行います。&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/apps/new&#34;&gt;&lt;a href=&#34;https://twitter.com/apps/new&#34;&gt;https://twitter.com/apps/new&lt;/a&gt;&lt;/a&gt;
クライアントアプリケーションなので「あなたの招待状」の部分を「送信」で登録。（日本語訳がおかしいですね。。）&lt;/p&gt;
&lt;h3&gt;2. xAuthの利用申請メール&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;http://dev.twitter.com/pages/xauth&#34;&gt;Using xAuth | dev.twitter.com&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
xAuth access is restricted to approved applications. If your application is a desktop or mobile application and the standard web OAuth flow or PIN-code out-of-band flow is not right for you, send a detailed message to api@twitter.com to request xAuth privileges. Include the name of your application, the consumer key, the application ID (if available), and a summary of how xAuth is best-suited for your application.
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;mailto:api@twitter.com&#34;&gt;api@twitter.com&lt;/a&gt;宛にメールで利用の申請をしてねとのことなので、メール（英語）でお伺いを立てました。&lt;/p&gt;
&lt;pre&gt;
To: api@twitter.com
Subject: xauth request

Hello.

I&#39;m a developer of &#34;tw2mv&#34;.

&#34;tw2mv&#34; is a php script, for sync messages between twitter and &#34;mixi voice&#34;.
(&#34;mixi voice&#34; is twitter-like service, in japanese SNS &#34;mixi&#34;.

Please apply this app to use xAuth.

Application Name: tw2mv
App Source Code : http://github.com/nojimage/twitter2mixivoice
My account      : @nojimage

Thank you.
&lt;/pre&gt;
&lt;p&gt;タイミングもあったと思いますが、申請から8hで承認がおりました。thanks!
(よく見たら、ConsumerKeyもメールに書いておいてねとある。。&lt;/p&gt;
&lt;h3&gt;3. OAuthライブラリ&lt;/h3&gt;
&lt;p&gt;pearのHTTP_OAuthを利用しました。&lt;/p&gt;
&lt;pre class=&#34;brush: bash&#34;&gt;
pear install HTTP_OAuth-0.1.10
&lt;/pre&gt;
&lt;p&gt;[ad]&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
