<?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 for jensbits</title>
	<atom:link href="http://www.jensbits.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jensbits.com</link>
	<description>my code snips</description>
	<lastBuildDate>Wed, 22 Feb 2012 17:25:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Google API Requests with OAuth 2.0 Access Token by jen</title>
		<link>http://www.jensbits.com/2011/12/29/google-api-requests-with-oauth-2-0-access-token/comment-page-1/#comment-4424</link>
		<dc:creator>jen</dc:creator>
		<pubDate>Wed, 22 Feb 2012 17:25:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=1351#comment-4424</guid>
		<description>@Chris

Are you getting any error messages? Are you getting a valid access token? Honestly, it&#039;s hard to help you unless you provide some more info.</description>
		<content:encoded><![CDATA[<p>@Chris</p>
<p>Are you getting any error messages? Are you getting a valid access token? Honestly, it&#8217;s hard to help you unless you provide some more info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Google API Requests with OAuth 2.0 Access Token by chris</title>
		<link>http://www.jensbits.com/2011/12/29/google-api-requests-with-oauth-2-0-access-token/comment-page-1/#comment-4423</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Wed, 22 Feb 2012 17:14:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=1351#comment-4423</guid>
		<description>I can&#039;t get this working...

&lt;code&gt;
    public function make_request($url, $data)
    {
            echo $url;
            if(is_array($data)) $data = implode(&#039;&amp;&#039;, $data);
            
            $curl = curl_init($url);

            curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            $curlheader[0] = &quot;Authorization: Bearer &quot; . $data;
            curl_setopt($curl, CURLOPT_HTTPHEADER, $curlheader);

            $json_response = curl_exec($curl);
            curl_close($curl);

            $responseObj = json_decode($json_response);
            return $responseObj;
    }

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I can&#8217;t get this working&#8230;</p>
<p><code><br />
    public function make_request($url, $data)<br />
    {<br />
            echo $url;<br />
            if(is_array($data)) $data = implode('&amp;', $data);</p>
<p>            $curl = curl_init($url);</p>
<p>            curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);<br />
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);<br />
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);<br />
            $curlheader[0] = "Authorization: Bearer " . $data;<br />
            curl_setopt($curl, CURLOPT_HTTPHEADER, $curlheader);</p>
<p>            $json_response = curl_exec($curl);<br />
            curl_close($curl);</p>
<p>            $responseObj = json_decode($json_response);<br />
            return $responseObj;<br />
    }</p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Google API Offline Access Using OAuth 2.0 Refresh Token by jen</title>
		<link>http://www.jensbits.com/2012/01/09/google-api-offline-access-using-oauth-2-0-refresh-token/comment-page-1/#comment-4422</link>
		<dc:creator>jen</dc:creator>
		<pubDate>Tue, 21 Feb 2012 02:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=1372#comment-4422</guid>
		<description>@Brad

Right, once you have the refresh token you will not need to log in again. Just retrieve it from the db and use it to get an access token.

The reason it fails on refresh is because it is using the URL param of code again and failing the auth since the code can only be used once.

Add the access token to session and it will work until the access token expires. There is a time limit returned with the access token and I believe it&#039;s good for several hours.</description>
		<content:encoded><![CDATA[<p>@Brad</p>
<p>Right, once you have the refresh token you will not need to log in again. Just retrieve it from the db and use it to get an access token.</p>
<p>The reason it fails on refresh is because it is using the URL param of code again and failing the auth since the code can only be used once.</p>
<p>Add the access token to session and it will work until the access token expires. There is a time limit returned with the access token and I believe it&#8217;s good for several hours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Google API Offline Access Using OAuth 2.0 Refresh Token by Brad</title>
		<link>http://www.jensbits.com/2012/01/09/google-api-offline-access-using-oauth-2-0-refresh-token/comment-page-1/#comment-4421</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Tue, 21 Feb 2012 02:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=1372#comment-4421</guid>
		<description>Heads up! I threw you some coins.

You might want to check this page out (http://www.jensbits.com/thank-you/) It&#039;s where PayPal redirected me when it was all done.

Anyway, thanks for the quick response. That&#039;s exactly how I have it configured. I wonder why the error hmmm.

Well, I have it returning my profile image now, but if I do a refresh on the page, it goes away.

Any ideas?

The good part about the offline access / refresh token is so that once I give it permission and it stores the tokens, I could view that page without being logged in or having any cookies and it still pull the data, right?</description>
		<content:encoded><![CDATA[<p>Heads up! I threw you some coins.</p>
<p>You might want to check this page out (<a href="http://www.jensbits.com/thank-you/" rel="nofollow">http://www.jensbits.com/thank-you/</a>) It&#8217;s where PayPal redirected me when it was all done.</p>
<p>Anyway, thanks for the quick response. That&#8217;s exactly how I have it configured. I wonder why the error hmmm.</p>
<p>Well, I have it returning my profile image now, but if I do a refresh on the page, it goes away.</p>
<p>Any ideas?</p>
<p>The good part about the offline access / refresh token is so that once I give it permission and it stores the tokens, I could view that page without being logged in or having any cookies and it still pull the data, right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Google API Offline Access Using OAuth 2.0 Refresh Token by jen</title>
		<link>http://www.jensbits.com/2012/01/09/google-api-offline-access-using-oauth-2-0-refresh-token/comment-page-1/#comment-4420</link>
		<dc:creator>jen</dc:creator>
		<pubDate>Tue, 21 Feb 2012 02:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=1372#comment-4420</guid>
		<description>@Brad

You can create your connection as such:
[php]$conn = new PDO(&quot;mysql:host=$dbhost;dbname=$dbname&quot;, $dbuser, $dbpass);[/php]
And close it like this:
[php]mysql_close($conn);[/php]
Substitute your variables for the connection of course. The mysql_close function needs the existing connection as an argument.
Maybe you already closed it?? Or, didn&#039;t supply the right argument variable name??</description>
		<content:encoded><![CDATA[<p>@Brad</p>
<p>You can create your connection as such:</p>
<pre class="brush: php; title: ; notranslate">$conn = new PDO(&quot;mysql:host=$dbhost;dbname=$dbname&quot;, $dbuser, $dbpass);</pre>
<p>And close it like this:</p>
<pre class="brush: php; title: ; notranslate">mysql_close($conn);</pre>
<p>Substitute your variables for the connection of course. The mysql_close function needs the existing connection as an argument.<br />
Maybe you already closed it?? Or, didn&#8217;t supply the right argument variable name??</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Google API Offline Access Using OAuth 2.0 Refresh Token by Brad</title>
		<link>http://www.jensbits.com/2012/01/09/google-api-offline-access-using-oauth-2-0-refresh-token/comment-page-1/#comment-4419</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Tue, 21 Feb 2012 01:50:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=1372#comment-4419</guid>
		<description>Well, I just learned about PDO.

I got this script connected to the database.
I even got my token back and I can see that it saved to the database, woohoo....

But I&#039;m still trying to workout why my script still returns this....

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in........

and the ol&#039; &quot;I got nothing&quot; at the end. haha</description>
		<content:encoded><![CDATA[<p>Well, I just learned about PDO.</p>
<p>I got this script connected to the database.<br />
I even got my token back and I can see that it saved to the database, woohoo&#8230;.</p>
<p>But I&#8217;m still trying to workout why my script still returns this&#8230;.</p>
<p>Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in&#8230;&#8230;..</p>
<p>and the ol&#8217; &#8220;I got nothing&#8221; at the end. haha</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Google API Offline Access Using OAuth 2.0 Refresh Token by Brad</title>
		<link>http://www.jensbits.com/2012/01/09/google-api-offline-access-using-oauth-2-0-refresh-token/comment-page-1/#comment-4418</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Tue, 21 Feb 2012 01:20:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=1372#comment-4418</guid>
		<description>I&#039;ve been searching for an article like this for a while.
I have everything in place, but connecting it to the database to store the tokens.

I&#039;m not familiar with the way you are building and executing the queries. Could you pretty pretty please give me an example of how the files look that you mention here...

&quot;Note that config.php contains your database configuration parameter (username, password, database name) and db.php contains the actual connection string&quot;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been searching for an article like this for a while.<br />
I have everything in place, but connecting it to the database to store the tokens.</p>
<p>I&#8217;m not familiar with the way you are building and executing the queries. Could you pretty pretty please give me an example of how the files look that you mention here&#8230;</p>
<p>&#8220;Note that config.php contains your database configuration parameter (username, password, database name) and db.php contains the actual connection string&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ColdFusion Session Timeout with Warning and jQuery Session Refresh by Brian</title>
		<link>http://www.jensbits.com/2010/04/18/coldfusion-session-timeout-with-warning-and-session-refresh/comment-page-2/#comment-4401</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Thu, 02 Feb 2012 01:32:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=681#comment-4401</guid>
		<description>Yeah I did try that. it&#039;s weird though.  I made the changes as per your post but it just breaks the code somehow. 

If I put the variable &#039;warning&#039; in there, the timer script never even executes. I tried replacing all the text with just 60000 as I want to have a 60 second countdown, and again the code just breaks still.

If I replace the 10 with a 60, basically manually specifying what the warning var should be set to, the script executes but it still only counts down 10 seconds, ending at 50 seconds, but the funny thing is it doesn&#039;t pause for 10 seconds after the countdown stops at 50. It just immediately redirects to the login page. So the script is malfunctioning differently in that scenario.

Frustrating. 

-Brian</description>
		<content:encoded><![CDATA[<p>Yeah I did try that. it&#8217;s weird though.  I made the changes as per your post but it just breaks the code somehow. </p>
<p>If I put the variable &#8216;warning&#8217; in there, the timer script never even executes. I tried replacing all the text with just 60000 as I want to have a 60 second countdown, and again the code just breaks still.</p>
<p>If I replace the 10 with a 60, basically manually specifying what the warning var should be set to, the script executes but it still only counts down 10 seconds, ending at 50 seconds, but the funny thing is it doesn&#8217;t pause for 10 seconds after the countdown stops at 50. It just immediately redirects to the login page. So the script is malfunctioning differently in that scenario.</p>
<p>Frustrating. </p>
<p>-Brian</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ColdFusion Session Timeout with Warning and jQuery Session Refresh by Michael Grant</title>
		<link>http://www.jensbits.com/2010/04/18/coldfusion-session-timeout-with-warning-and-session-refresh/comment-page-2/#comment-4400</link>
		<dc:creator>Michael Grant</dc:creator>
		<pubDate>Wed, 01 Feb 2012 21:13:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=681#comment-4400</guid>
		<description>@Brian

Well it&#039;s been a long time since I looked into it, but the change I listed is what I needed to do to make it work. I can verify that was the correct fix. Perhaps you need to clear your cache?</description>
		<content:encoded><![CDATA[<p>@Brian</p>
<p>Well it&#8217;s been a long time since I looked into it, but the change I listed is what I needed to do to make it work. I can verify that was the correct fix. Perhaps you need to clear your cache?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on ColdFusion Session Timeout with Warning and jQuery Session Refresh by Brian</title>
		<link>http://www.jensbits.com/2010/04/18/coldfusion-session-timeout-with-warning-and-session-refresh/comment-page-2/#comment-4399</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Wed, 01 Feb 2012 21:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.jensbits.com/?p=681#comment-4399</guid>
		<description>@Michael Grant

I made that same change you suggested in the script but it doesn&#039;t seem to rectify the issue. Any suggestions?

-Brian</description>
		<content:encoded><![CDATA[<p>@Michael Grant</p>
<p>I made that same change you suggested in the script but it doesn&#8217;t seem to rectify the issue. Any suggestions?</p>
<p>-Brian</p>
]]></content:encoded>
	</item>
</channel>
</rss>

