<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using OAuth-enabled APIs with CakePHP</title>
	<atom:link href="http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Mon, 15 Mar 2010 20:27:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-2/#comment-141675</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 10 Dec 2009 15:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141675</guid>
		<description>@Kakakatt: Sure, here it is. The consumer class:
&lt;code&gt;
// app/controllers/components/oauth_consumers/google_consumer.php
class GoogleConsumer extends AbstractConsumer {
    public function __construct() {
        parent::__construct(&#039;anonymous&#039;, &#039;anonymous&#039;);
    }
}
&lt;/code&gt;
And the controller:
&lt;code&gt;
// app/controllers/google_example_controller.php
class GoogleExampleController extends AppController {
    public $uses = array();
    public $components = array(&#039;OauthConsumer&#039;);
	
    public function index() {
        $requestToken = $this-&gt;OauthConsumer-&gt;getRequestToken(&#039;Google&#039;, &#039;https://www.google.com/accounts/OAuthGetRequestToken&#039;, &#039;http://test.localhost/google_example/callback&#039;, &#039;POST&#039;, array(&#039;scope&#039; =&gt; &#039;http://picasaweb.google.com/data&#039;));
        $this-&gt;Session-&gt;write(&#039;request_token&#039;, $requestToken);
	
        $this-&gt;redirect(&#039;https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=&#039; . $requestToken-&gt;key);
    }
	
    public function callback() {
        $requestToken = $this-&gt;Session-&gt;read(&#039;request_token&#039;);
        $accessToken = $this-&gt;OauthConsumer-&gt;getAccessToken(&#039;Google&#039;, &#039;https://www.google.com/accounts/OAuthGetAccessToken&#039;, $requestToken);
        
        debug($accessToken);
        exit;
    }
}
&lt;/code&gt;
I hope this helps.

And regarding OAuth and Picasa: at least according to Google&#039;s &lt;a href=&quot;http://googledataapis.blogspot.com/2008/06/oauth-for-google-data-apis.html&quot; rel=&quot;nofollow&quot;&gt;OAuth announcement&lt;/a&gt; Picasa should also be supported.</description>
		<content:encoded><![CDATA[<p>@Kakakatt: Sure, here it is. The consumer class:<br />
<pre><code>// app/controllers/components/oauth_consumers/google_consumer.php
class GoogleConsumer extends AbstractConsumer {
    public function __construct() {
        parent::__construct('anonymous', 'anonymous');
    }
}</code></pre><br />
And the controller:<br />
<pre><code>// app/controllers/google_example_controller.php
class GoogleExampleController extends AppController {
    public $uses = array();
    public $components = array('OauthConsumer');
	
    public function index() {
        $requestToken = $this-&gt;OauthConsumer-&gt;getRequestToken('Google', 'https://www.google.com/accounts/OAuthGetRequestToken', 'http://test.localhost/google_example/callback', 'POST', array('scope' =&gt; 'http://picasaweb.google.com/data'));
        $this-&gt;Session-&gt;write('request_token', $requestToken);
	
        $this-&gt;redirect('https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=' . $requestToken-&gt;key);
    }
	
    public function callback() {
        $requestToken = $this-&gt;Session-&gt;read('request_token');
        $accessToken = $this-&gt;OauthConsumer-&gt;getAccessToken('Google', 'https://www.google.com/accounts/OAuthGetAccessToken', $requestToken);
        
        debug($accessToken);
        exit;
    }
}</code></pre><br />
I hope this helps.</p>
<p>And regarding OAuth and Picasa: at least according to Google&#8217;s <a href="http://googledataapis.blogspot.com/2008/06/oauth-for-google-data-apis.html" rel="nofollow">OAuth announcement</a> Picasa should also be supported.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kakakatt</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-2/#comment-141651</link>
		<dc:creator>Kakakatt</dc:creator>
		<pubDate>Wed, 09 Dec 2009 23:45:41 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141651</guid>
		<description>May I read your code ?  I have used Oauth component 2009-09-05 version. 
The link you provided do not deal with the problem, it was just warning of mistake. I have read sources from Google API that: Picasa is just compatible with Auth http://code.google.com/apis/picasaweb/docs/1.0/developers_guide_php.html</description>
		<content:encoded><![CDATA[<p>May I read your code ?  I have used Oauth component 2009-09-05 version.<br />
The link you provided do not deal with the problem, it was just warning of mistake. I have read sources from Google API that: Picasa is just compatible with Auth <a href="http://code.google.com/apis/picasaweb/docs/1.0/developers_guide_php.html" rel="nofollow">http://code.google.com/apis/picasaweb/docs/1.0/developers_guide_php.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-2/#comment-141623</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Wed, 09 Dec 2009 15:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141623</guid>
		<description>@Kakakatt: Hm, I just tried it myself and it worked fine without removing the param. Do you use the latest version of the oauth component?

What is the problem with picasa? At least from this ticket &lt;a href=&quot;http://code.google.com/p/gdata-issues/issues/detail?id=701&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/gdata-issues/issues/detail?id=701&lt;/a&gt; it seems like OAuth is supported by picasa.</description>
		<content:encoded><![CDATA[<p>@Kakakatt: Hm, I just tried it myself and it worked fine without removing the param. Do you use the latest version of the oauth component?</p>
<p>What is the problem with picasa? At least from this ticket <a href="http://code.google.com/p/gdata-issues/issues/detail?id=701" rel="nofollow">http://code.google.com/p/gdata-issues/issues/detail?id=701</a> it seems like OAuth is supported by picasa.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kakakatt</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-1/#comment-141397</link>
		<dc:creator>Kakakatt</dc:creator>
		<pubDate>Sat, 05 Dec 2009 15:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141397</guid>
		<description>I found the error.It occurs when I tried to receive the request token,
There was a oauth_callback_confirmed string flowing. It looks like this:
&lt;code&gt;object(OAuthToken)#30 (2) { [&quot;key&quot;]=&gt; string(30) &quot;4/kJgZjbdAcEujx8acnVOyaPYJZKRa&quot; [&quot;secret&quot;]=&gt; string(54) &quot;N4lAsT6qQnZahUTbRF1Cm66/&amp;oauth_callback_confirmed=true&quot; }&lt;/code&gt;
Yep, you need to remove the call back string and then the problem will be solved
&lt;code&gt;object(OAuthToken)#30 (2) { [&quot;key&quot;]=&gt; string(30) &quot;4/kJgZjbdAcEujx8acnVOyaPYJZKRa&quot; [&quot;secret&quot;]=&gt; string(54) &quot;N4lAsT6qQnZahUTbRF1Cm66/&quot; }&lt;/code&gt;
But I have a other problem that OAuth can’t be used with picasa. Are there anyone want to help me ? Thanks</description>
		<content:encoded><![CDATA[<p>I found the error.It occurs when I tried to receive the request token,<br />
There was a oauth_callback_confirmed string flowing. It looks like this:<br />
<code>object(OAuthToken)#30 (2) { ["key"]=&gt; string(30) "4/kJgZjbdAcEujx8acnVOyaPYJZKRa" ["secret"]=&gt; string(54) "N4lAsT6qQnZahUTbRF1Cm66/&amp;oauth_callback_confirmed=true" }</code><br />
Yep, you need to remove the call back string and then the problem will be solved<br />
<code>object(OAuthToken)#30 (2) { ["key"]=&gt; string(30) "4/kJgZjbdAcEujx8acnVOyaPYJZKRa" ["secret"]=&gt; string(54) "N4lAsT6qQnZahUTbRF1Cm66/" }</code><br />
But I have a other problem that OAuth can’t be used with picasa. Are there anyone want to help me ? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kakakatt</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-1/#comment-141396</link>
		<dc:creator>Kakakatt</dc:creator>
		<pubDate>Sat, 05 Dec 2009 15:50:37 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141396</guid>
		<description>I found the error.It occurs when I tried to receive the request token,
There was a oauth_callback_confirmed string flowing. It looks like this:
&lt;code&gt;
object(OAuthToken)#30 (2) { [&quot;key&quot;]=&gt; string(30) &quot;4/kJgZjbdAcEujx8acnVOyaPYJZKRa&quot; [&quot;secret&quot;]=&gt; string(54) &quot;N4lAsT6qQnZahUTbRF1Cm66/&amp;oauth_callback_confirmed=true&quot; }
 &lt;/code&gt;
Yep, you need to remove the call back string and then the problem will be solved
&lt;code&gt;
object(OAuthToken)#30 (2) { [&quot;key&quot;]=&gt; string(30) &quot;4/kJgZjbdAcEujx8acnVOyaPYJZKRa&quot; [&quot;secret&quot;]=&gt; string(54) &quot;N4lAsT6qQnZahUTbRF1Cm66/&quot; }
 &lt;/code&gt;
But I have a other problem that OAuth can&#039;t be used with picasa. Are there anyone want to help me ? Thanks</description>
		<content:encoded><![CDATA[<p>I found the error.It occurs when I tried to receive the request token,<br />
There was a oauth_callback_confirmed string flowing. It looks like this:<br />
<code>object(OAuthToken)#30 (2) { ["key"]=&gt; string(30) "4/kJgZjbdAcEujx8acnVOyaPYJZKRa" ["secret"]=&gt; string(54) "N4lAsT6qQnZahUTbRF1Cm66/&amp;oauth_callback_confirmed=true" }</code><br />
Yep, you need to remove the call back string and then the problem will be solved<br />
<code>object(OAuthToken)#30 (2) { ["key"]=&gt; string(30) "4/kJgZjbdAcEujx8acnVOyaPYJZKRa" ["secret"]=&gt; string(54) "N4lAsT6qQnZahUTbRF1Cm66/" }</code><br />
But I have a other problem that OAuth can&#8217;t be used with picasa. Are there anyone want to help me ? Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-1/#comment-141391</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Sat, 05 Dec 2009 13:59:06 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141391</guid>
		<description>@Kakakatt: Your code looks correct. Did you check with a tool like Wireshark whether a request was performed? And is the OpenSSL extension activated in your php.ini?

Hope this helps!</description>
		<content:encoded><![CDATA[<p>@Kakakatt: Your code looks correct. Did you check with a tool like Wireshark whether a request was performed? And is the OpenSSL extension activated in your php.ini?</p>
<p>Hope this helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kakakatt</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-1/#comment-141067</link>
		<dc:creator>Kakakatt</dc:creator>
		<pubDate>Tue, 01 Dec 2009 10:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141067</guid>
		<description>oops, what &#039;s wrong with my code :&#124; ? 
&lt;code&gt; public function index() {
		
        $requestToken = $this-&gt;OauthConsumer-&gt;getRequestToken(&#039;Google&#039;,&#039;https://www.google.com/accounts/OAuthGetRequestToken&#039;);
		//var_dump($requestToken); exit();
        $this-&gt;Session-&gt;write(&#039;requestToken&#039;, $requestToken);
        $this-&gt;redirect(&#039;https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=&#039;.$requestToken-&gt;key);
    }

	 public function callback() {
        $requestToken = $this-&gt;Session-&gt;read(&#039;requestToken&#039;);
        $accessToken = $this-&gt;OauthConsumer-&gt;getAccessToken(&#039;Google&#039;, &#039;https://www.google.com/accounts/OAuthGetAccessToken&#039;, $requestToken);
    }&lt;/code&gt;

In google_consumer.php

&lt;code&gt;class GoogleConsumer extends AbstractConsumer {
    public function __construct() {
        parent::__construct(&#039;my key&#039;, &#039;my secret&#039;);
    }
} &lt;/code&gt;

In http_socket.php the code 
&lt;code&gt;$response = null;
		
		while ($data = $this-&gt;read()) {
			
			$response .= $data;				
		}
 &lt;/code&gt;
It doesn&#039;t work, $response is always NULL !!!</description>
		<content:encoded><![CDATA[<p>oops, what &#8217;s wrong with my code :| ?<br />
<pre><code>public function index() {
		
        $requestToken = $this-&gt;OauthConsumer-&gt;getRequestToken('Google','https://www.google.com/accounts/OAuthGetRequestToken');
		//var_dump($requestToken); exit();
        $this-&gt;Session-&gt;write('requestToken', $requestToken);
        $this-&gt;redirect('https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token='.$requestToken-&gt;key);
    }

	 public function callback() {
        $requestToken = $this-&gt;Session-&gt;read('requestToken');
        $accessToken = $this-&gt;OauthConsumer-&gt;getAccessToken('Google', 'https://www.google.com/accounts/OAuthGetAccessToken', $requestToken);
    }</code></pre>
<p>In google_consumer.php</p>
<pre><code>class GoogleConsumer extends AbstractConsumer {
    public function __construct() {
        parent::__construct('my key', 'my secret');
    }
}</code></pre>
<p>In http_socket.php the code<br />
<pre><code>$response = null;
		
		while ($data = $this-&gt;read()) {
			
			$response .= $data;				
		}</code></pre><br />
It doesn&#8217;t work, $response is always NULL !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kakakatt</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-1/#comment-141035</link>
		<dc:creator>Kakakatt</dc:creator>
		<pubDate>Tue, 01 Dec 2009 01:04:25 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-141035</guid>
		<description></description>
		<content:encoded><![CDATA[<p>Please help me! I use your OAuth component with google service but i have a problem. I don&#8217;t know why $requestToken is NULL !!! My code is:<br />
<code>bxukz+ 殶˦z-QzƢ%zm %y&amp;Fz^笵:$zݺjkz+m+ '*'+׫zz+ m %y&amp;@h,NhzGbwVrJު笵:$z{a-I,භv-NzGӚB{.Ƣ%zm %y&amp;Fzq,N-N</code></p>
<p>and in oauth_consumer folder i have a file google_consumer.php :</p>
<p><code>rVj(W{.קvrШ˦znnX~ܶ*'r춻z{{--)ly</code></p>
<p>I checked it and I realized that the request method in http_socket.php doesn&#8217;t work, It always return NULL. I don&#8217;t know why. Please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Using OAuth-enabled APIs with CakePHP - cakebaker -- Topsy.com</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-1/#comment-139866</link>
		<dc:creator>Tweets that mention Using OAuth-enabled APIs with CakePHP - cakebaker -- Topsy.com</dc:creator>
		<pubDate>Sun, 08 Nov 2009 22:08:44 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-139866</guid>
		<description>[...] This post was mentioned on Twitter by Benjamin Pearson, Benjamin Pearson. Benjamin Pearson said: @benjaminpearson It&#039;s basically built on this http://bit.ly/vnwlj [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Benjamin Pearson, Benjamin Pearson. Benjamin Pearson said: @benjaminpearson It&#39;s basically built on this <a href="http://bit.ly/vnwlj" rel="nofollow">http://bit.ly/vnwlj</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2008/09/01/using-oauth-enabled-apis-with-cakephp/comment-page-1/#comment-136535</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 17 Sep 2009 14:28:23 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/?p=769#comment-136535</guid>
		<description>@HHuan: Hm, I am not sure I understand your question. What do you try to accomplish? In the code I noticed two things: in the google() method you have to redirect to an &quot;authorize&quot; page at the end of the method. And the code below &quot;below i dont know how to handle it&quot; you have to use a Google url, you can&#039;t post to twitter with an access token from Google. 

Hope that helps a bit!</description>
		<content:encoded><![CDATA[<p>@HHuan: Hm, I am not sure I understand your question. What do you try to accomplish? In the code I noticed two things: in the google() method you have to redirect to an &#8220;authorize&#8221; page at the end of the method. And the code below &#8220;below i dont know how to handle it&#8221; you have to use a Google url, you can&#8217;t post to twitter with an access token from Google. </p>
<p>Hope that helps a bit!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
