<?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>Sosuke</title>
	<atom:link href="http://www.sosuke.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sosuke.com</link>
	<description>Dark music of the gods.</description>
	<lastBuildDate>Sat, 02 Feb 2013 04:06:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Getting started with Python web development: Setting up the environment</title>
		<link>http://www.sosuke.com/index.php/2013/02/01/getting-started-with-python-web-development-setting-up-the-environment/</link>
		<comments>http://www.sosuke.com/index.php/2013/02/01/getting-started-with-python-web-development-setting-up-the-environment/#comments</comments>
		<pubDate>Sat, 02 Feb 2013 04:06:56 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=227</guid>
		<description><![CDATA[Python is a fun language. It is easy to read, write, and they have libraries for almost everything. To try and catch up though all at once I am going to go through the process of setting up the new hot stack. I will be going through this setup on my system using Mac OSX [...]]]></description>
				<content:encoded><![CDATA[<p>Python is a <strong>fun</strong> language. It is easy to read, write, and they have libraries for <a href="http://xkcd.com/353/">almost everything</a>. To try and catch up though all at once I am going to go through the process of setting up the new hot stack. I will be going through this setup on my system using Mac OSX 10.8.2, and we&#8217;ll use pip and brew for installing our dependancies for this article (What the heck is <a href="http://www.pip-installer.org/">pip</a> or <a href="http://mxcl.github.com/homebrew/">brew</a>?) as it makes getting setup very easy.</p>
<p>Where we&#8217;ll end up:</p>
<ul>
<li><a href="http://www.python.org/">Python</a> 2.7</li>
<li><span style="line-height: 13px;">Separate Python environments using <a href="http://pypi.python.org/pypi/virtualenv">virtualenv</a> to help with development down the road</span></li>
<li><a href="http://flask.pocoo.org/">Flask</a> micro-framework for the web server, template engine and API development</li>
<li><a href="http://www.mongodb.org/">MongoDB</a> for our document store using the <a href="http://api.mongodb.org/python/current/">PyMongo</a> library</li>
<li><a href="http://jinja.pocoo.org/docs/">Jinja2</a> for the front-end template engine, bundled with Flask</li>
<li><a href="http://packages.python.org/Flask-OpenID/">Flask-OpenID</a> for user login</li>
</ul>
<p><strong>Installing Python</strong></p>
<p>Easiest step, Mac OSX 10.8.2 is already running Python 2.7.2! If you don&#8217;t think you have it open up a terminal and type the command <em>python &#8211;version</em>. If you don&#8217;t it, go download and install it: <a href="http://www.python.org/getit/">http://www.python.org/getit/</a></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ python --version
Python 2.7.2</pre></td></tr></table></div>

<p><strong>Installing virtualenv</strong></p>
<p>Open up your terminal and fire off a this command to install virtualenv, you may have to use <a href="http://www.sudo.ws/">sudo</a> to elevate the command.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ sudo pip install virtualenv</pre></td></tr></table></div>

<p>After it is installed make a directory to store and locate any virtual environments you have setup for Python and go into that directory.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ mkdir virtualenvs
$ cd virtualenvs</pre></td></tr></table></div>

<p>To make a new virtual environment is really easy, just type the command <em>virtualenv environmentName</em> and it creates the directory structure for you.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ virtualenv envTest
New python executable in envTest/bin/python
Installing setuptools............done.
Installing pip...............done.</pre></td></tr></table></div>

<p>Go into that new directory that virtualenv created and you&#8217;ll see a full folder structure with Python 2.7 in there for you. This is important, to activate the environment <strong>on this terminal only </strong>run the command <em>source bin/activate</em><em> </em>to get into the new virtual environment. Use the command <em>deactiavte</em> to get back out of the virtual environment. Any <strong>pip</strong> commands we run in here, while active, will install to this virtual environment only instead of the computers global store.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ source bin/activate
(envTest) $ pip install blah
(envTest) $ deactivate
$</pre></td></tr></table></div>

<p><strong>Why mess with virtualenv at all?</strong></p>
<p>When you start having multiple projects, on multiple servers, you want your local development environment to match that of the server, including things like different framework versions. Setting up and using virtual environments like this allows you to get in the good habit of knowing what is on your box and available to you, and why you chose what you did.</p>
<p><strong>Installing Flask, PyMongo, and Flask-OpenID</strong></p>
<p>Get back into your virtual environment directory you setup earlier and then lets run the easy pip install commands!<em><br />
</em></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ source bin/activate
(envTest) $ pip install Flask
(envTest) $ pip install pymongo
(envTest) $ pip install Flask-OpenID
(envTest) $ deactivate</pre></td></tr></table></div>

<p><strong>Install MongoDB</strong></p>
<p>I just followed the <a href="http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/">MongoDB installation</a> instructions and it worked perfectly. Simply type the command <em>brew install mongodb </em>and you&#8217;re good to go.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">$ brew install mongodb</pre></td></tr></table></div>

<p><strong>Test the environment setup</strong></p>
<p>So now that we have everything installed lets run a test Python script to verify that everything is working as we expected. Open up a new terminal and fire up MongoDB using the command <em>mongod </em> and then run this script after activating your virtual environment on the terminal you are in.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> flask <span style="color: #ff7700;font-weight:bold;">import</span> Flask
<span style="color: #ff7700;font-weight:bold;">from</span> pymongo <span style="color: #ff7700;font-weight:bold;">import</span> MongoClient
<span style="color: #ff7700;font-weight:bold;">import</span> flask_openid
&nbsp;
mc <span style="color: #66cc66;">=</span> MongoClient<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;PyMongo test: &quot;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> mc.<span style="color: black;">database_names</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;flask_openid test: &quot;</span>
<span style="color: #ff7700;font-weight:bold;">print</span> flask_openid.<span style="color: black;">COMMON_PROVIDERS</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">&quot;google&quot;</span><span style="color: black;">&#93;</span>
&nbsp;
app <span style="color: #66cc66;">=</span> Flask<span style="color: black;">&#40;</span>__name__<span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">@</span>app.<span style="color: black;">route</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'/'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">def</span> hello_world<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>:
	<span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: #483d8b;">&quot;Flask is running!&quot;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">if</span> __name__ <span style="color: #66cc66;">==</span> <span style="color: #483d8b;">'__main__'</span>:
	app.<span style="color: black;">run</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>You should see a result something like this after running it, which means that each library we installed is working correctly.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;">(envTest) $ python envTest.py 
PyMongo test: 
[u'local']
flask_openid test: 
https://www.google.com/accounts/o8/id
 * Running on http://127.0.0.1:5000/</pre></td></tr></table></div>

<p>Now we&#8217;re all setup and ready to code, which is what I think I&#8217;ll save for the next post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2013/02/01/getting-started-with-python-web-development-setting-up-the-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Launching the TheKnot.com Search BETA</title>
		<link>http://www.sosuke.com/index.php/2012/12/24/launching-the-theknot-com-search-beta/</link>
		<comments>http://www.sosuke.com/index.php/2012/12/24/launching-the-theknot-com-search-beta/#comments</comments>
		<pubDate>Mon, 24 Dec 2012 22:31:38 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Data]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Website Analysis]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=199</guid>
		<description><![CDATA[My major project of 2012, TheKnot.com Search BETA, launched earlier this month, the morning of December 14th, and it was a journey worth documenting. It began back in May when the company decided to start our own labs or internal incubator groups. One began right away in New York City and the other started a [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-210" alt="Screen Shot 2012-12-24 at 4.22.03 PM" src="http://www.sosuke.com/wp-content/uploads/2012/12/Screen-Shot-2012-12-24-at-4.22.03-PM-300x174.png" width="300" height="174" /></p>
<p>My major project of 2012, <a href="http://search.theknot.com/search/?q=eden%20bridals">TheKnot.com Search BETA</a>, launched earlier this month, the morning of December 14th, and it was a journey worth documenting. It began back in May when the company decided to start our own labs or internal incubator groups. One began right away in New York City and the other started a couple weeks later in Austin. I had the opportunity to join the Austin group with a team of developers and product people that I highly respected. I was grinning the whole time with excitement. With the direction that we were independent from the company but had access to the data we sequestered ourselves in a room for a few weeks. Over pots of coffee and pints of beer after work we brainstormed our some good ideas for our brides to find inspiration for their weddings. Our group started out as Judy Galani, Product Strategist, Forrest Andrews and Matt Oehlers, Senior Software Engineers, Erin Bender, Freelance Art Director, and myself as Interactive Media Developer. We &#8220;sold&#8221; the idea and working prototype to our &#8220;investors&#8221; by October and it was then time to go from prototype to production.</p>
<p>We had to take the design in house from this point on, but after a fond farewell and thank you to Erin we started to add in more management to the group. It was a <a href="http://en.wikipedia.org/wiki/Greenfield_project">greenfield project</a> so our back-end developers Matt and Forrest were excited to push forward into new territories. Within a day or two we were able to deploy projects straight from Visual Studio to the AWS servers, I was blown away. Forrest focused on our <a href="http://www.mongodb.org/">MongoDB NoSQL</a> data store and the API that I would later pull all the front-end content from, <a href="http://www.asp.net/mvc">ASP.NET MVC</a>. Matt worked on massaging the data into <a href="http://lucene.apache.org/solr/">Apache Solr</a> and in a matter of days we had an impressive result set coming back for queries.</p>
<p><img class="alignleft size-medium wp-image-212" alt="Screen Shot 2012-12-24 at 4.22.40 PM copy" src="http://www.sosuke.com/wp-content/uploads/2012/12/Screen-Shot-2012-12-24-at-4.22.40-PM-copy-196x300.png" width="196" height="300" /></p>
<p>The front-end technology was built to be a responsive two page website that used a combination ofjQuery and <a href="http://underscorejs.org/">Underscore.js</a> along with HTML and CSS to create a multi-device interface that would be familiar and easy to use. The <a href="http://search.theknot.com/search/?q=eden%20bridals">main grid view</a> uses <a href="http://masonry.desandro.com/">Masonry</a> to create the Pinterest-esque layout for search results and Underscore.js templates to load in a different layout for different data types. The <a href="http://search.theknot.com/search/single?q=eden%20bridals">single page view</a> focuses on a low browser width touch interface to give a very image focused search experience. To combine and minify the page scripts down I used the <a href="http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification">BundleCollection</a> library in ASP.NET MVC which worked great. There are still a large number of extra scripts on the page but I&#8217;ve tried to load them asynchronously and not let them interfere with using the interface immediately.</p>
<p>The site has been up and working great for a few weeks now and launched along side a new look and feel for <a href="http://TheKnot.com">TheKnot.com</a>. Go take a look, and of course let me know if you find any bugs here or on the feedback tab on the bottom!</p>
<p><span id="more-199"></span></p>
<hr style="clear: left;" />
<p>&nbsp;</p>
<p><strong>Search beta team at launch:</strong><br />
Forrest Andrews<br />
Judy Galani<br />
Keith Higbee<br />
Ringo Lertprecha<br />
Matt Oehlers<br />
Barrett Sonntag</p>
<p><strong>Special thanks:</strong><br />
Erin Bender<br />
Rob Fassino<br />
David Liu<br />
Carley Roney<br />
Matthew Rook<br />
Jason Sirota<br />
All our loved ones patience!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2012/12/24/launching-the-theknot-com-search-beta/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding Pinterest sharing to your iOS app</title>
		<link>http://www.sosuke.com/index.php/2012/05/08/adding-pinterest-sharing-to-your-ios-app/</link>
		<comments>http://www.sosuke.com/index.php/2012/05/08/adding-pinterest-sharing-to-your-ios-app/#comments</comments>
		<pubDate>Wed, 09 May 2012 00:14:25 +0000</pubDate>
		<dc:creator>Barrett Sonntag</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Objective-C]]></category>
		<category><![CDATA[Pinterest]]></category>

		<guid isPermaLink="false">http://www.sosuke.com/?p=171</guid>
		<description><![CDATA[Update: It looks like this latest version of Pinterest has removed the URL scheme to post directly to the app. I do hope they add it back in with another update. I&#8217;ve been working on a new version of the iOS app, Wedding Dress Look Book by The Knot, and I wanted to add in sharing [...]]]></description>
				<content:encoded><![CDATA[<p><strong>Update:</strong> It looks like this latest version of Pinterest has removed the URL scheme to post directly to the app. I do hope they add it back in with another update.</p>
<p>I&#8217;ve been working on a new version of the iOS app, <a title="Wedding Dress Look Book by The Knot" href="http://itunes.apple.com/us/app/wedding-dress-look-book-by/id362763144?mt=8" target="_blank">Wedding Dress Look Book by The Knot</a>, and I wanted to add in sharing features for the most popular networks. This a wedding dress browsing and sharing app, it has to be the top three social networks, Facebook, Twitter, and of course, Pinterest. I know that Pinterest doesn&#8217;t have a public sharing API yet, but I use there app on my iPhone, and I have a good idea of how it works. For Facebook and Twitter I find out that iOS supports <a href="http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html" target="_blank">URL Schemes</a>, which allow me to just open an app as I would open Safari. Just change the protocol, http for regular URLs, to the name of the app. I found a site that has a list of all sorts of apps that support this, fb:// for Facebook, twitter:// for the Twitter app etc. Unfortunately they didn&#8217;t have Pinterest, but an easy guess of pinterest:// launched the app right away, though I didn&#8217;t know of the options, and I still couldn&#8217;t find any documentation. I started to think about how the Pin It bookmark works, the URL scheme must be inside that JavaScript file that Pinterest loads onto the site in mobile Safari. After running the file, <a href="http://passets-cdn.pinterest.com/js/pinmarklet.js" target="_blank">http://passets-cdn.pinterest.com/js/pinmarklet.js</a>, through a <a href="http://jsbeautifier.org/" target="_blank">Javascript Beautifier</a> we can see Pinterest developers speak lolcat with plenty of hazSite and hazIOS. That was it!</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>51
52
53
54
55
56
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">v</span>.<span style="color: #660066;">hazIOS</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	a.<span style="color: #660066;">w</span>.<span style="color: #660066;">setTimeout</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		a.<span style="color: #660066;">w</span>.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;pinit12://&quot;</span> <span style="color: #339933;">+</span> e
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">25</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	a.<span style="color: #660066;">w</span>.<span style="color: #660066;">location</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;http://&quot;</span> <span style="color: #339933;">+</span> e
<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> a.<span style="color: #660066;">w</span>.<span style="color: #660066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://&quot;</span> <span style="color: #339933;">+</span> e<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;pin&quot;</span> <span style="color: #339933;">+</span> f<span style="color: #339933;">,</span> a.<span style="color: #660066;">a</span>.<span style="color: #660066;">pop</span><span style="color: #009900;">&#41;</span></pre></td></tr></table></div>

<p>Pinterest&#8217;s URL scheme is pinit12, I&#8217;m guessing 12 is a version number. A little more digging around and I came up with a list of working parameters.</p>
<p><strong>URL Scheme: </strong>pinit12://pinterest.com/pin/create/bookmarklet/?</p>
<ul>
<li><strong>media</strong>: a direct link to the image or I think an encoded image (base64?)</li>
<li><strong>url</strong>: the URL of the source website where the image was found</li>
<li><strong>description</strong>: 500 characters max</li>
<li><strong>is_video</strong>: self describing</li>
</ul>
<p>Since this code isn&#8217;t officially supported it is subject to change, and thankfully there is a way to future proof your app from having a broken link. You are able to check if a URL can be opened without actually opening it in iOS. The trick then is prepping your URL, seeing if it can be opening, and only then displaying the option to share with Pinterest. Using a UIActionSheet, with ARC enabled, this is what I came up with.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">int</span> count <span style="color: #002200;">=</span> <span style="color: #2400d9;">1</span>;
UIActionSheet <span style="color: #002200;">*</span>sheet <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIActionSheet alloc<span style="color: #002200;">&#93;</span> initWithTitle<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;&quot;</span> delegate<span style="color: #002200;">:</span>self cancelButtonTitle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> destructiveButtonTitle<span style="color: #002200;">:</span><span style="color: #a61390;">nil</span> otherButtonTitles<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Email&quot;</span>, <span style="color: #a61390;">nil</span><span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>post <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSString</span> stringWithFormat<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;pinit12://pin/create/bookmarklet/?media=%@&quot;</span>,<span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;http://yourdomain.com/yourimage.jpg&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>escapedStringURL <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>post stringByAddingPercentEscapesUsingEncoding<span style="color: #002200;">:</span>NSUTF8StringEncoding<span style="color: #002200;">&#93;</span>;
<span style="color: #400080;">NSURL</span> <span style="color: #002200;">*</span>url <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSURL</span> URLWithString<span style="color: #002200;">:</span>escapedStringURL<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span>UIApplication sharedApplication<span style="color: #002200;">&#93;</span> canOpenURL<span style="color: #002200;">:</span>url<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #002200;">&#91;</span>sheet addButtonWithTitle<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Pinterest&quot;</span><span style="color: #002200;">&#93;</span>;
    <span style="color: #002200;">++</span>count;
<span style="color: #002200;">&#125;</span>
&nbsp;
<span style="color: #002200;">&#91;</span>sheet addButtonWithTitle<span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;Cancel&quot;</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#91;</span>sheet setCancelButtonIndex<span style="color: #002200;">:</span>count<span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>

<p>This way, in case the URL scheme changes from pinit12 in the future it won&#8217;t break your application.</p>
<p>It has been added as a URL scheme to <a href="http://wiki.akosma.com/IPhone_URL_Schemes">http://wiki.akosma.com/IPhone_URL_Schemes</a>, most links seem to hit that listing. Thanks <a href="https://twitter.com/#!/akosmasoftware">@akosmasoftware</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sosuke.com/index.php/2012/05/08/adding-pinterest-sharing-to-your-ios-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
