<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jason Ashdown &#187; Zend Framework</title>
	<atom:link href="http://www.jasonashdown.co.uk/tag/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonashdown.co.uk</link>
	<description>There&#039;s no place like 127.0.0.1</description>
	<lastBuildDate>Thu, 22 Dec 2011 11:40:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Create your first Twitter App with Zend Framework</title>
		<link>http://www.jasonashdown.co.uk/2011/02/create-your-first-twitter-app/</link>
		<comments>http://www.jasonashdown.co.uk/2011/02/create-your-first-twitter-app/#comments</comments>
		<pubDate>Mon, 28 Feb 2011 23:50:46 +0000</pubDate>
		<dc:creator>Jason Ashdown</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[OAuth]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.jasonashdown.co.uk/?p=92</guid>
		<description><![CDATA[I finally got round to writing my first Twitter App using Zend OAuth. Here are my tips and explanation to getting your Twitter App up and running. Getting Started Register at http://dev.twitter.com/ and create your first App. You can change &#8230; <a href="http://www.jasonashdown.co.uk/2011/02/create-your-first-twitter-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I finally got round to writing my first <a href="http://dev.twitter.com/">Twitter App</a> using <a href="http://framework.zend.com/manual/en/zend.oauth.introduction.html">Zend OAuth</a>.</p>
<p>Here are my tips and explanation to getting your Twitter App up and running.</p>
<h3>Getting Started</h3>
<p>Register at <a href="http://dev.twitter.com/">http://dev.twitter.com/</a> and create your first <em>App</em>. You can change all the settings at any time, so don&#8217;t worry about getting them wrong.</p>
<h3>Setting Up the Twitter App</h3>
<p>Authorise a <em>Domain URL</em>, you can even use localhost for testing purposes.</p>
<p>It is <span style="text-decoration: underline;">important</span> you set the <em>Callback URL</em> otherwise you can&#8217;t use the <em>Browser App</em> option and your OAuth will <strong>fail</strong>.</p>
<p>Quickly access your App&#8217;s details at <a href="http://twitter.com/oauth">http://twitter.com/oauth</a>.</p>
<p>When coding with Zend OAuth, read the <a href="http://framework.zend.com/manual/en/zend.oauth.introduction.html">documentation</a> carefully!<br />
It has <em>everything</em> you need.</p>
<h3>My Mistake</h3>
<p>I did not understand how to grab the <em>Access Token</em>. Reason? It&#8217;s a two part process. Requesting, then <em>Receiving</em>.</p>
<h3>The Code</h3>
<p>Here is a working example of a <em>Request Token</em> with <a href="http://framework.zend.com/manual/en/zend.oauth.introduction.html">Zend OAuth</a> and <em>your</em> Twitter App&#8217;s <em>Consumer Key</em> and <em>Consumer Secret</em>.</p>
<p>(Note the keys used are the ones from Zend&#8217;s Article)</p>
<pre class="brush: php; title: ; notranslate">
$config = array(
'callbackUrl' =&gt; 'http://example.com/callback.php',
'siteUrl' =&gt; 'http://twitter.com/oauth',
'consumerKey' =&gt; 'gg3DsFTW9OU9eWPnbuPzQ',
'consumerSecret' =&gt; 'tFB0fyWLSMf74lkEu9FTyoHXcazOWpbrAjTCCK48A'
);
$consumer = new Zend_Oauth_Consumer($config);

// fetch a request token
$token = $consumer-&gt;getRequestToken();

// persist the token to storage
$_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token);

// redirect the user
$consumer-&gt;redirect();
</pre>
<h3>Steps you must do:</h3>
<ol>
<li>Use the <em>Callback URL</em> to receive the <em>Access Token</em></li>
<li>Store the <em>Request Token</em> in a $_SESSION</li>
<li>Follow the <a href="http://framework.zend.com/manual/en/zend.oauth.introduction.html"><em>getAccessToken()</em></a> example and store this in a $_SESSION or Database (recommended)</li>
</ol>
<h3>Why store the <em>Access Token</em> in a Database?</h3>
<p>The best thing about the <em>Access Token</em> is that once you&#8217;ve successfully requested one, it never expires!</p>
<p>So save the hassle of requesting a new token and use it throughout your website. Great thing is, it can&#8217;t be compromised!</p>
<p>Without the the <em>Consumer Key</em> and <em>Consumer Secret</em>, you can&#8217;t hijack the users account for malicious purposes.</p>
<p>Please leave a comment if you want me to write another article about how to implement the example into your scripts or maybe I&#8217;ll update this one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonashdown.co.uk/2011/02/create-your-first-twitter-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weekly Round Up: Issue 1</title>
		<link>http://www.jasonashdown.co.uk/2010/02/weekly-round-up-issue-1/</link>
		<comments>http://www.jasonashdown.co.uk/2010/02/weekly-round-up-issue-1/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 12:34:33 +0000</pubDate>
		<dc:creator>Jason Ashdown</dc:creator>
				<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[IE8]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.jasonashdown.co.uk/?p=69</guid>
		<description><![CDATA[I often hunt around on the internet for the latest information to do with Web Development. Most of the time it goes to my Twitter but I thought it would be great if I could start logging a collection of &#8230; <a href="http://www.jasonashdown.co.uk/2010/02/weekly-round-up-issue-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I often hunt around on the internet for the latest information to do with Web Development. Most of the time it goes to my Twitter but I thought it would be great if I could start logging a collection of the best ones I read.</p>
<p>So if you enjoy keeping up with the latest trends, I hope you enjoy my information bites!</p>
<p>HTML5 won&#8217;t save the web<br />
<a href="http://gizmodo.com/5461711/giz-explains-why-html5-isnt-going-to-save-the-internet">http://gizmodo.com/5461711/giz-explains-why-html5-isnt-going-to-save-the-internet</a></p>
<p>Facebook develop faster PHP<br />
<a href="http://www.neowin.net/news/facebook-unveils-hiphop-for-php-039source-code-transformer039">http://www.neowin.net/news/facebook-unveils-hiphop-for-php-039source-code-transformer039</a></p>
<p>IE8 now &#8220;most popular&#8221; version of IE<br />
<a href="http://www.neowin.net/news/ie8-is-now-the-world039s-most-used-browser">http://www.neowin.net/news/ie8-is-now-the-world039s-most-used-browser</a></p>
<p>Zend Framework 1.10 Released (and now with versioned documentation!)<br />
<a href="http://devzone.zend.com/article/11727-Zend-Framework-1.10.0-STABLE-Released">http://devzone.zend.com/article/11727-Zend-Framework-1.10.0-STABLE-Released</a></p>
<p>PHP hates integers (64 bit)<br />
<a href="http://www.mysqlperformanceblog.com/2007/03/27/integers-in-php-running-with-scissors-and-portability/">http://www.mysqlperformanceblog.com/2007/03/27/integers-in-php-running-with-scissors-and-portability/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonashdown.co.uk/2010/02/weekly-round-up-issue-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

