<?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>Chris Monnat &#187; Programming</title>
	<atom:link href="http://www.christophermonnat.com/topics/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christophermonnat.com</link>
	<description>Programmer Extraordinaire</description>
	<lastBuildDate>Thu, 03 Dec 2009 19:24:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Entrepreneur Heal Thyself</title>
		<link>http://www.christophermonnat.com/2009/12/entrepreneur-heal-thyself/</link>
		<comments>http://www.christophermonnat.com/2009/12/entrepreneur-heal-thyself/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 19:24:30 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=899</guid>
		<description><![CDATA[As a freelancer or sole proprietor, how do you decide when to start a new project? I&#8217;m not talking about taking on client projects&#8230; I&#8217;m referring to ventures, product or application ideas that you have and think would make a good business. Are you the kind of person who gets an idea in their head [...]]]></description>
			<content:encoded><![CDATA[<p>As a freelancer or sole proprietor, how do you decide when to start a new project? I&#8217;m not talking about taking on client projects&#8230; I&#8217;m referring to ventures, product or application ideas that you have and think would make a good business. Are you the kind of person who gets an idea in their head one day and jumps in head first the next? Or, do you need to have a plan in place with potential return on investment before you pick up your mouse? Until recently, I would have said that I fell in between those two extremes landing a bit closer to needing a plan than jumping in. However, over the last several months I have come to the conclusion that I fall smack dab in the first group and have determined that that&#8217;s not necessarily a good thing.</p>
<p><span id="more-899"></span></p>
<h2>To program, or not to program that is the question</h2>
<p>If you have spent any time on this site or on <a href="http://leftofcentercom.com">LOCCs</a> you will have some idea of the projects I&#8217;m involved with. I developed BadgeTracker about 5 years ago, Sign-Up-Sheet.com followed about a year or two later accompanied most recently by myScoutPath and ScoutMailer. Contrary to most entrepreneurs I actually found my niche <strong>after</strong> I had developed a product. BadgeTracker was developed quickly and gained a following and after a little research I determined that the scouting industry was an attractive market to compete in so I selected it as my niche. The products that followed were aimed at scouts first and other groups second and I saw that as having great potential.</p>
<p>The problem here, that I didn&#8217;t realize until just recently, is that I had taken on too much. While I do outsource some work to contractors I am the only programmer, support person and business administrator I got. That means that while I&#8217;m answering support e-mails development stops. While I&#8217;m following up on overdue invoices no one is following up with the sales leads. While I&#8217;m programming no one is marketing. This lead to having 3 or 4 mediocre projects/products that were moving forward at a snails pace.</p>
<p>I had jumped head first into any idea that popped into my head, investing time and money to get it online and then ran out of resources to sustain, support and grow them. This lead to a great deal of frustration on my part because I was unable to work on the things I wanted to work on, investigate new ideas and opportunities or even write on my blog because I was stuck in the muck.</p>
<h2>Wait&#8230; where&#8217;s the money?</h2>
<p>Some of you may be wondering why I didn&#8217;t hire a staff or assistants to help maintain some of this. The short answer is the money wasn&#8217;t there. While the scouting industry may have looked like an attractive market at first, I have found over the years that working with non-profits is somewhat complicated and making a sale is difficult needle to thread. So while I was making some money it wasn&#8217;t enough to hire help or even leave my day job to dedicate more time. All of this of course contributed to more frustration on my part which is a very unproductive mind set to be in.</p>
<h2>Recovery</h2>
<p>What this all boils down to is not having a good vision and plan in place for the business. I should have slowed things down and investigated new ideas a bit more before jumping in a starting development and I should have finished one thing before starting another. I&#8217;m sick and tired of being sick and tired so I think it&#8217;s time for a new plan.</p>
<p>The one thing that all great businesses have in common is  great products. There are plenty of businesses out there with mediocre products and they come and go each year along with whatever is &#8220;in&#8221; at the time. I have decided that I&#8217;m not content with creating mediocre products&#8230; I&#8217;m out to create a great product and doing that requires focus. So I&#8217;ve come to the conclusion that I need to &#8220;reboot&#8221; and start 2010 with a new plan/vision. I think Dr. Charles Emerson Winchester III, from M.A.S.H, put it best when he said &#8220;I do one thing at a time, I do it very well and then I move on.&#8221; This probably means some of my many projects and ideas may be discontinued or abandoned to drift with the current but I&#8217;m confident that this is a better approach than what I have been trying.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/12/entrepreneur-heal-thyself/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simplified Compatibility Checking</title>
		<link>http://www.christophermonnat.com/2009/06/simplify-compatibility-checking/</link>
		<comments>http://www.christophermonnat.com/2009/06/simplify-compatibility-checking/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 15:45:01 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=851</guid>
		<description><![CDATA[Fever, a new RSS feed reading application, just launched recently. Many of you might be familiar with the developer Shaun Inman from his popular stats tracking app Mint. I haven&#8217;t personally used Mint but I&#8217;m a huge fan of RSS feeds so when I heard about Fever I had to give it a shot. I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2009/06/fever-logo.png"><img class="alignright size-full wp-image-853" title="fever-logo" src="http://www.christophermonnat.com/wp-content/uploads/2009/06/fever-logo.png" alt="fever-logo" width="110" height="58" /></a><a href="http://feedafever.com">Fever</a>, a new RSS feed reading application, just launched recently. Many of you might be familiar with the developer <a href="http://www.shauninman.com">Shaun Inman</a> from his popular stats tracking app <a href="http://haveamint.com">Mint</a>. I haven&#8217;t personally used Mint but I&#8217;m a huge fan of RSS feeds so when I heard about Fever I had to give it a shot. I will probably talk about the application a little later after I&#8217;ve had a chance to play with it. But, in this post I wanted to talk briefly about the unique checkout process Shaun uses to help make sure his users are installing the program on a compatable system before they even enter their credit card number.</p>
<p><span id="more-851"></span></p>
<p>One of the difficulties when selling software that needs to be installed is making sure the software is compatible with the users computer/system. I know this is <em>supposed</em> to be a responsibility of the user, but if they make a mistake they will be contacting you for support. Fever takes a unique approach to confirming users are installing the software on compatible machines. Shaun has created a process that links a compatibility check with his checkout/licensing process so that users can only purchase a license if they are installing the program on a compatible machine.</p>
<p style="text-align: center;"><a href="http://www.christophermonnat.com/wp-content/uploads/2009/06/fever-compatability.png"><img class="size-full wp-image-852 aligncenter" title="fever-computability" src="http://www.christophermonnat.com/wp-content/uploads/2009/06/fever-compatability.png" alt="fever-compatibility" width="381" height="537" /></a></p>
<p style="text-align: left;">Before you can purchase a license you first download a small package that you upload to the location where you intend on installing the program. From there the package checks your systems compatibility and asks for database information (shown in the image above). Once entered, and after privileges have been checked, you are provided with a link back to the Fever site that populates the purchase form with a unique ID. This ID, I assume, matches your site with the compatibility check performed and then you continue with purchasing the license.</p>
<p>This process is genius! It allows the developer to prove the user is going to be installing the software on a compatible machine before selling them a license. I can image this process greatly reduces, if not eliminates, the support requests having to do with system compatibility and installation issues. Very cool idea!</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/06/simplify-compatibility-checking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Speedy Subscriptions Using Spreedly (Part 2) &#8211; Account Configuration</title>
		<link>http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-2-account-configuration/</link>
		<comments>http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-2-account-configuration/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 10:00:52 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=750</guid>
		<description><![CDATA[If you&#8217;ve ever accepted payments with PayPal you&#8217;ll know all the magic is in the settings/configuration. There are tons of configuration options that you can modify to make PayPal work just the way you like. The same holds true for Spreedly. The developers have paid attention to detail and provided us with the ability to [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve ever accepted payments with PayPal you&#8217;ll know all the magic is in the settings/configuration. There are tons of configuration options that you can modify to make PayPal work just the way you like. The same holds true for Spreedly. The developers have paid attention to detail and provided us with the ability to tweak how the service interacts with your chosen payment gateway so you can get just the functionality you&#8217;re looking for. In the last post I gave you a brief introduction to Spreedly and walked you through creating your own free test account. Today we&#8217;re going to jump in head first and look at the account configuration options.</p>
<p><span id="more-750"></span></p>
<p>For those viewers following along at home, if you look at the configuration page, I&#8217;m going to cover each section in reverse order wrapping up with setting up your subscription plans.</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2009/05/spreedly-config.gif"><img class="aligncenter size-full wp-image-792" title="spreedly-config" src="http://www.christophermonnat.com/wp-content/uploads/2009/05/spreedly-config.gif" alt="spreedly-config" width="595" height="328" /></a></p>
<h2>Site Details</h2>
<p>The site details section is where, you guess it, you enter the details of the site you are going to be integrating with Spreedly. The information requested on this form is pretty straight forward so I&#8217;m just going to touch on 2 parts.</p>
<p><center><a href="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-site-details.gif"><img class="aligncenter size-full wp-image-795" title="spreedly-site-details" src="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-site-details.gif" alt="spreedly-site-details" width="490" height="371" /></a></center></p>
<p><strong>URLs</strong></p>
<p>About half way through the form they ask for 3 URLs:</p>
<ol>
<li>Subscriber Changed Notification URL
<p>Since you are using a system that is external to your application to handle payment processing you will have to work out some way to sync the two so your sure people have only those accounts they have paid for. That&#8217;s where the subscribers changed notification URL comes into play. When subscriber data within Spreedly changes, the service will POST a comma separated value list of subscriber IDs to the address you specify here. It then becomes your responsibility to process those changes and sync them with your application.</li>
<li>Individual user URL on your site
<p>This is the address that users visit to view their specific information in your program. Spreedly uses this address to redirect users back to your program from their update screen.</li>
<li>Subscription selection URL on your site
<p>This is that place in your program where users can upgrade/downgrade their account. Again, Spreedly uses this address to redirect users back to your program from their system.</li>
</ol>
<p>I will come back to these URLs later in the series so go ahead and leave them blank for now.</p>
<p><strong>API Authentication Token</strong></p>
<p>At the bottom of the site details form you will find your sites API Authentication Token. This is the token you will use when interacting with the Spreedly API. Be sure to handle with care and keep it a secret&#8230; you can always generate a new one if you need to. Make note of this because we will be using it in the posts to come.</p>
<h2>Manage Site Users</h2>
<p>One of the really nice things about Spreedly is that you can add as many users to your account as you wish without hitting any limits. So, if your organization has a 10 person support/accounting team (wishful thinking perhaps) you can add them all with their own access information from the Manage Site Users section.</p>
<h2>Payment Gateway</h2>
<p>The Payment Gateway section is where you will go when you&#8217;re ready to take your site out of testing and into production. You will have to upgrade your Spreedly account from a test site to a production site and either sign-up for the monthly pricing option or bite the bullet and get a <a href="https://spreedly.com/info/kickstart/">Kickstart package</a>. For the time being, the page just displays some example CC numbers you can use to generate different errors.</p>
<h2>Subscription Plans</h2>
<p>Now to the important stuff! The Subscription Plans section is where you setup your applications different subscription plans and pricing. By default, Spreedly has setup one example plan to give you an idea how things work. I will issue one word of caution here, you CANNOT delete subscription plans. I hope this is coming soon, because I have made a mess out of my other account, but for right now it can&#8217;t be done. Just keep this in mind as you enter your plans.</p>
<p>I want to draw your attention to 2 pieces on this form:</p>
<p><center><a href="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-subscription-plans.gif"><img class="aligncenter size-full wp-image-796" title="spreedly-subscription-plans" src="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-subscription-plans.gif" alt="spreedly-subscription-plans" width="490" height="383" /></a></center></p>
<p><strong>Feature Level</strong></p>
<p>The feature level is the name with which you will refer to the subscription plan through the API. You want to keep this simple yet specific so you can easily match it up with a subscription type. I typically just repeat the plan name as one word lowercase just to keep it easy.</p>
<p><strong>Plan Type</strong></p>
<p>The type of plan is where you can specify if this is a regular subscription, gift subscription or free trial. This really gives you a lot of options when setting up your applications pricing structure. You can set the amount of time each plan is valid for before charging the user again (number of days or months). You can also specify if you want to require auto-recurring purchases (you only accept auto-recurring payments) or not. The sky&#8217;s the limit!</p>
<h2>That&#8217;s it!</h2>
<p>After you play around with your settings and subscription types a little bit you will have a configured Spreedly test account ready to accept subscribers. In the next post I&#8217;m going to take a break from the Spreedly specific stuff for a little while and talk about planning your sign-up/checkout process and determining how that&#8217;s going to work with your newly configured Spreedly account.</p>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-1-service-overview-introduction/' rel='bookmark' title='Permanent Link: Speedy Subscriptions Using Spreedly (Part 1) &#8211; Overview &#038; Account Setup'>Speedy Subscriptions Using Spreedly (Part 1) &#8211; Overview &#038; Account Setup</a></li>
<li><a href='http://www.christophermonnat.com/2009/05/building-applications-using-codeigniter-part-2-configuration/' rel='bookmark' title='Permanent Link: Building Applications using CodeIgniter (Part 2) &#8211; Configuration'>Building Applications using CodeIgniter (Part 2) &#8211; Configuration</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-2-account-configuration/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Speedy Subscriptions Using Spreedly (Part 1) &#8211; Overview &amp; Account Setup</title>
		<link>http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-1-service-overview-introduction/</link>
		<comments>http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-1-service-overview-introduction/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 10:00:12 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=747</guid>
		<description><![CDATA[I developed Sign-Up-Sheet.com four years ago first as a sandbox project for learning Ruby on Rails (RoR). After becoming disillusioned with RoR, I redeveloped the app in PHP using CodeIgniter (CI) and that&#8217;s where it&#8217;s been ever since. Every once and a while I try to add a new feature here or there but find [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-logo.gif"><img class="alignright size-full wp-image-776" title="spreedly-logo" src="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-logo.gif" alt="spreedly-logo" width="160" height="90" /></a>I developed <a href="http://www.sign-up-sheet.com">Sign-Up-Sheet.com</a> four years ago first as a sandbox project for learning Ruby on Rails (RoR). After becoming disillusioned with RoR, I redeveloped the app in PHP using <a href="http://www.codeigniter.com">CodeIgniter</a> (CI) and that&#8217;s where it&#8217;s been ever since. Every once and a while I try to add a new feature here or there but find it very difficult to focus any time/energy on a product that doesn&#8217;t generate any revenue. The solution to this problem, of course, is to start charging for the service. But every time I researched what was involved with accepting credit cards the complicated pricing schemes and high costs always turned me away. That was until I found <a href="http://www.spreedly.com">Spreedly</a>! This post kicks off a new series that will take a detailed look at Spreedly. Over the next couple of weeks, I will introduce you to the service, walk you through how their system works and give you a real world example so you can see it in action.<br />
<span id="more-747"></span></p>
<h2>What is Spreedly?</h2>
<p>Aside from the best thing since sliced bread&#8230; Spreedly is a service that takes the hassle out of collecting subscription fees for web based services/applications. Developing applications that use 3rd party payment gateways and that sell recurring subscriptions is a difficult and often expensive undertaking. Spreedly simplifies the process by handling the complex task of subscription management and payment processing for you so you can focus your time and money on your product.</p>
<p>After configuring your Spreedly account and entering your subscription types and pricing scheme, the service will handle all the payment gateway interaction and user subscription management for you&#8230; no muss no fuss. Accepting payments literally becomes as easy as redirecting your user to a Spreedly URL and having them enter their credit card information. That&#8217;s it!!</p>
<h2>Supported Gateways</h2>
<p>It&#8217;s important to understand that <strong>Spreedly is not a payment gateway</strong>. Spreedly simply acts as the middle man between your application and your selected gateway using APIs. This means you will still need to find a payment gateway and merchant account (if necessary). The simplest, and cheapest, option is probably <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside">PayPal</a> because it&#8217;s a gateway and merchant account all-in-one. But if that doesn&#8217;t work for you, Spreedly currently supports the following gateways:</p>
<ul>
<li><a href="http://www.authorize.net/">Authorize.net</a> (Only US dollars)</li>
<li><a href="http://www.beanstream.com/">Beanstream</a> (Only Canadian dollars)</li>
<li><a href="http://www.eway.com.au/">eWAY</a> (Only Australian dollars)</li>
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside">PayPal Website Payments Pro</a> (also <a href="https://www.paypal.com/uk/cgi-bin/webscr?cmd=_wp-pro-overview-outside">UK</a>)</li>
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_additional-payment-overview-outside">PayPal Express Checkout</a> (also <a href="https://www.paypal.com/uk/cgi-bin/webscr?cmd=_additional-payment-overview-outside">UK</a>)<br />
(does not currently support automatically recurring subscriptions)</li>
<li><a href="http://www.sagepay.com/">Sage Pay</a> (formerly Protx)</li>
<li><a href="http://usaepay.com/">USA ePay</a> (Only US dollars)</li>
</ul>
<p>They are constantly adding new gateways to the service so be sure to visit <a href="http://www.spreedly.com/info/payment-gateways/">their site</a> for the most updated list. If you don&#8217;t see your gateway listed above the odds are good that they can add it for you. Just contact their support team and they will research what&#8217;s involved.</p>
<h2>Pricing</h2>
<p>Accepting credit cards online is an expensive proposition&#8230; that&#8217;s why I have avoided it up until now. There are bank fees for merchant accounts, fees for each transaction, monthly fees for the payment gateway, etc&#8230; not to mention the percentage of each transaction that certain parities take just because they can. It&#8217;s enough to make you dizzy!</p>
<p>The pricing for Spreedly is pretty straight forward:</p>
<p><strong>$19 per month + transaction fees</strong></p>
<ul>
<li>3% on the first 50 transactions per month</li>
<li>2% on transactions 51 through 5000</li>
<li>1% on all transactions after 5000</li>
</ul>
<p>The thing to point out here is that the Spreedly fees will be on top of whatever your payment gateway charges. In the end you are still probably looking at a decent sum of money&#8230; but odds are it&#8217;s still cheaper (programming included) than if you went it alone or with another service.</p>
<p>If there are too many monthly fees for you to handle, Spreedly also has another pricing option called the <a href="http://www.spreedly.com/info/kickstart/">Kickstart package</a>. For one single payment of $699.00 you can get a Spreedly account <strong>for life</strong> with:</p>
<ul>
<li>a frozen per-transaction fee of 1%</li>
<li>no monthly fees</li>
<li>and it never expires!!</li>
</ul>
<p>It pays to keep an eye on the Spreedly site (and maybe follow their <a href="http://twitter.com/spreedly">Twitter account</a>) for special offers because when they first launched Kickstart the price was $499.00 for a limited time. So there are opportunities for picking up deals if you pay attention.</p>
<h2>Account Setup</h2>
<p>Now that you have a basic understanding of what Spreedly is, let&#8217;s go ahead and create a test account. Spreedly makes it super easy to get your bearings and see how the system works without spending any money. You can sign-up for a free test account (which gives you access to everything you need) and see if it will work for you. To create your account, visit <a href="https://www.spreedly.com/signup">https://www.spreedly.com/signup</a> and fill out the form.</p>
<p><a href="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-overview.gif"><img class="aligncenter size-full wp-image-789" title="spreedly-overview" src="http://www.christophermonnat.com/wp-content/uploads/2009/06/spreedly-overview.gif" alt="spreedly-overview" width="595" height="351" /></a></p>
<p>After signing-up you will be directed to your test site overview page (shown above). The overview page gives you a summary of your account in terms of transactions and subscribers. You can click around the interface if you like but it&#8217;s going to be pretty empty until we start submitting transactions (which we&#8217;ll get to later in this series).</p>
<h2>That&#8217;s a wrap</h2>
<p>That does it for the Spreedly intro. In the next post I will review how to configure your account and setup your subscription plans/pricing scheme.</p>
<p>I&#8217;m just getting started with Spreedly so stay tuned!</p>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-2-account-configuration/' rel='bookmark' title='Permanent Link: Speedy Subscriptions Using Spreedly (Part 2) &#8211; Account Configuration'>Speedy Subscriptions Using Spreedly (Part 2) &#8211; Account Configuration</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/06/speedy-subscriptions-using-spreedly-part-1-service-overview-introduction/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Facebook Connect Library for CodeIgniter</title>
		<link>http://www.christophermonnat.com/2009/05/facebook-connect-library-for-codeigniter/</link>
		<comments>http://www.christophermonnat.com/2009/05/facebook-connect-library-for-codeigniter/#comments</comments>
		<pubDate>Mon, 18 May 2009 22:00:52 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=762</guid>
		<description><![CDATA[Just a brief follow-up to the post series I did a while back on Implementing Facebook Connect with CI. Today, Elliot Haughin continued his tradition of releasing helpful CI libraries and published a new library for implementing Facebook Connect using CodeIgniter. Haven&#8217;t had a chance to review it personally yet but I would imagine it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Just a brief follow-up to the post series I did a while back on <a href="http://www.christophermonnat.com/guides">Implementing Facebook Connect with CI</a>. Today, Elliot Haughin continued his tradition of releasing helpful CI libraries and published a <a href="http://www.haughin.com/2009/05/18/new-codeigniter-library-facebook-connect/">new library for implementing Facebook Connect using CodeIgniter</a>. Haven&#8217;t had a chance to review it personally yet but I would imagine it&#8217;s just the thing to make implementing Facebook Connect on your CI site easier. Check it out!</p>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-1/' rel='bookmark' title='Permanent Link: Implementing Facebook Connect (Part 1) &#8211; What is Facebook Connect?'>Implementing Facebook Connect (Part 1) &#8211; What is Facebook Connect?</a></li>
<li><a href='http://www.christophermonnat.com/2009/02/implementing-facebook-connect-part-3-accessing-data-from-facebook/' rel='bookmark' title='Permanent Link: Implementing Facebook Connect (Part 3) &#8211; Accessing Data from Facebook'>Implementing Facebook Connect (Part 3) &#8211; Accessing Data from Facebook</a></li>
<li><a href='http://www.christophermonnat.com/2008/08/ci-inferno/' rel='bookmark' title='Permanent Link: CI Inferno'>CI Inferno</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/05/facebook-connect-library-for-codeigniter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How-to Ensure a Secure Connection Using PHP</title>
		<link>http://www.christophermonnat.com/2009/05/how-to-ensure-a-secure-connection/</link>
		<comments>http://www.christophermonnat.com/2009/05/how-to-ensure-a-secure-connection/#comments</comments>
		<pubDate>Fri, 01 May 2009 10:00:04 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[CodeIgniter]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=636</guid>
		<description><![CDATA[



Image via Wikipedia



When submitting sensitive information over the web it&#8217;s important to ensure that the requested page is being accessed via an HTTPS encrypted connection. I&#8217;ve come across some forms that don&#8217;t check whether a secure connection has been made or not. In other words, you can delete the S from HTTP and instead of [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 171px;">
<dt class="wp-caption-dt"><a href="http://en.wikipedia.org/wiki/Image:SympaticoSecurityManagerSafe.png"><img title="‎Sympatico Security Manager" src="http://upload.wikimedia.org/wikipedia/en/9/99/SympaticoSecurityManagerSafe.png" alt="‎Sympatico Security Manager" width="161" height="131"></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/Image:SympaticoSecurityManagerSafe.png">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>When submitting sensitive information over the web it&#8217;s important to <strong>ensure</strong> that the requested page is being accessed via an HTTPS encrypted connection. I&#8217;ve come across some forms that don&#8217;t check whether a secure connection has been made or not. In other words, you can delete the S from HTTP and instead of redirecting the user back to the HTTPS connection the form is just displayed unsecured. This is a BIG NO NO&#8230; as a programmer you cannot rely on the visitor, or even other developers who would be linking to the form, to request a form securely. In this post I will review how you can ensure that your users are accessing certain pages using a secure connection.<br />
<span id="more-636"></span></p>
<h2>The Server Superglobal</h2>
<p>How can you tell if your user is requesting a certain page using a secure connection (HTTPS)? Enter the <a href="http://www.php.net/manual/en/reserved.variables.server.php">PHP server surperglobal</a>.</p>
<p>&#8220;<var class="varname">$_SERVER</var> is an array containing information    such as headers, paths, and script locations. The entries in this    array are created by the web server.&#8221;<br />
- PHP Manual (http://www.php.net)</p>
<p>There are 2 elements within this array that you can check that will tell you whether the user has made a secure request or not: <strong>https</strong> and <strong>server_port</strong>.</p>
<h2>Programmer Beware</h2>
<p>Something to keep in mind is that each web server will provide or not provide certain information in the $_SERVER array depending on their configuration. The PHP manual also points this out:</p>
<p>&#8220;There is no guarantee that    every web server will provide any of these; servers may omit some,    or provide others not listed here.&#8221;<br />
- PHP Manual (http://www.php.net)</p>
<p>So I guess that brings us back to the original question: how can you tell if your user is requesting a certain page using a secure connection (HTTPS)? Of the 2 elements mentioned above, server_port is part of the CGI 1.1 specification so the chances are good that element will be available in most servers. You can check for the availability of the https element if you wish but you should also include a check of the server_port as a fallback.</p>
<h2>The Code</h2>
<p>There is a good code example in the <a href="http://www.php.net/manual/en/reserved.variables.server.php#89306">comments of the PHP manual</a> of a function that checks whether or not the user has made a secure request:</p>
<pre class="brush: php">
&lt;?php
function isSSL(){

if($_SERVER[&#039;https&#039;] == 1) /* Apache */ {
return TRUE;
} elseif ($_SERVER[&#039;https&#039;] == &#039;on&#039;) /* IIS */ {
return TRUE;
} elseif ($_SERVER[&#039;SERVER_PORT&#039;] == 443) /* others */ {
return TRUE;
} else {
return FALSE; /* just using http */
}

}
?&gt;
</pre>
<p>This example function makes use of both the https and server_port elements of the superglobal array and also takes into account the different values that might be provided based on the web server. The only thing I will mention about using the server_port element is to make sure you know what port your server is using for HTTPS connections. I believe 443 is the standard, but ports can be changed so you just want to make sure you are checking the correct port for your server.</p>
<h2>What about CodeIgniter (CI)?</h2>
<p>If your programming using CI, you could certainly put the function above in a helper and call it whenever necessary. Or, a technique I&#8217;ve used successfully in the past, is to put the check in a custom library and auto load it. When you do it this way the connection is tested every time a page is loaded automatically without you having to make any additional function calls. And instead of returning TRUE or FALSE you can simply redirect the user to the requested page using HTTPS instead of HTTP which truly automates the process.</p>
<p>One thing that can trip you up when making secure connections using CI is the address you&#8217;ve entered on line 14 of application/config/config.php. If you enter just a static address starting with HTTP then HTTP will be used when calling any URL helper function like site_url() or anchor(). To avoid this issue,&nbsp; you can replace line 14 with the following code from the <a href="http://codeigniter.com/wiki/Automatic_configbase_url/">CI wiki</a>:</p>
<pre class="brush: php">

$config[&#039;base_url&#039;] = ((isset($_SERVER[&#039;HTTPS&#039;]) &amp;amp;&amp;amp; $_SERVER[&#039;HTTPS&#039;] == &quot;on&quot;) ? &quot;https&quot; : &quot;http&quot;);
$config[&#039;base_url&#039;] .= &quot;://&quot;.$_SERVER[&#039;HTTP_HOST&#039;];
$config[&#039;base_url&#039;] .= str_replace(basename($_SERVER[&#039;SCRIPT_NAME&#039;]),&quot;&quot;,$_SERVER[&#039;SCRIPT_NAME&#039;]); 
</pre>
<p>This code will automatically set the base_url config element so you don&#8217;t have to. This also comes in real handy when writing portable code that you want to distribute to other users or clients for installation on their own servers.</p>
<h2>That&#8217;s a wrap</h2>
<p>That does it for making sure your files are being accessed securely. If you have any questions or use a different technique for checking secure connections please share them by posting a comment.</p>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2008/09/customizing-domains-with-wildcard-dns/' rel='bookmark' title='Permanent Link: Customizing Domains With Wildcard DNS'>Customizing Domains With Wildcard DNS</a></li>
<li><a href='http://www.christophermonnat.com/2009/02/implementing-facebook-connect-part-3-accessing-data-from-facebook/' rel='bookmark' title='Permanent Link: Implementing Facebook Connect (Part 3) &#8211; Accessing Data from Facebook'>Implementing Facebook Connect (Part 3) &#8211; Accessing Data from Facebook</a></li>
<li><a href='http://www.christophermonnat.com/2008/08/generating-pdf-files-using-codeigniter/' rel='bookmark' title='Permanent Link: Generating PDF files using CodeIgniter'>Generating PDF files using CodeIgniter</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/05/how-to-ensure-a-secure-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m a Zend Certified Engineer (ZCE)</title>
		<link>http://www.christophermonnat.com/2009/03/im-a-zend-certified-engineerzce/</link>
		<comments>http://www.christophermonnat.com/2009/03/im-a-zend-certified-engineerzce/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 15:04:29 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Misc.]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=562</guid>
		<description><![CDATA[Last week I mentioned that I was going in for my Zend PHP 5 Certification exam on Friday. The test has come and gone and I&#8217;m happy to say I passed. To be honest, the test was a little more difficult than I thought it would be and I was a bit nervous at the [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I mentioned that I was going in for my Zend PHP 5 Certification exam on Friday. The test has come and gone and I&#8217;m happy to say I passed. To be honest, the test was a little more difficult than I thought it would be and I was a bit nervous at the end. But I passed and I can cross that off my list of goals for 2009 <img src='http://www.christophermonnat.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>If you are considering getting certified I would deffinitly recommend it. I can&#8217;t speak on the impact it will have on your ability to get a job or anything like that, but I can tell you that it&#8217;s a nice accomplishment just for yourself. If there was one thing I learned while studying for the test it&#8217;s how much I didn&#8217;t know about PHP. 5 years of programming still left some large gaps in my knowledge which this process has helped me realize and reduce. If your not certified give it a shot, you&#8217;ve got nothing to loose.</p>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2009/03/zend-php-certification-necessary-or-not/' rel='bookmark' title='Permanent Link: Zend PHP Certification: Necessary or Not?'>Zend PHP Certification: Necessary or Not?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/03/im-a-zend-certified-engineerzce/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Zend PHP Certification: Necessary or Not?</title>
		<link>http://www.christophermonnat.com/2009/03/zend-php-certification-necessary-or-not/</link>
		<comments>http://www.christophermonnat.com/2009/03/zend-php-certification-necessary-or-not/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 17:25:42 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=547</guid>
		<description><![CDATA[



Image via Wikipedia



I have to start this post out with a quick apology for the lack of recent posts. There is a lot going on right now: working on ScoutPath (which launches in June), putting out fires in BadgeTracker and working full time at my day job. All of this leaves little time for blogging [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="margin: 1em; display: block;">
<div>
<dl class="wp-caption alignright" style="width: 212px;">
<dt class="wp-caption-dt"><a href="http://en.wikipedia.org/wiki/Image:PHP-logo.svg"><img title="PHP" src="http://upload.wikimedia.org/wikipedia/en/thumb/2/27/PHP-logo.svg/202px-PHP-logo.svg.png" alt="PHP" width="202" height="107" /></a></dt>
<dd class="wp-caption-dd zemanta-img-attribution" style="font-size: 0.8em;">Image via <a href="http://en.wikipedia.org/wiki/Image:PHP-logo.svg">Wikipedia</a></dd>
</dl>
</div>
</div>
<p>I have to start this post out with a quick apology for the lack of recent posts. There is a lot going on right now: working on <a href="http://www.myscoutpath.com">ScoutPath </a>(which launches in June), putting out fires in <a href="http://www.badgetracker.com">BadgeTracker</a> and working full time at my day job. All of this leaves little time for blogging (or anything else for that matter). Another thing I&#8217;m working on is getting my <a href="http://www.zend.com/en/services/certification/php-5-certification/">Zend PHP 5 certification</a> and that brings me to this post. A couple of years ago when Zend first announced the certification I was determined to get certified but just haven&#8217;t put my mind to it until recently. However, after studying for the last couple of weeks and taking the <a href="http://vulcan.phparch.com">practice tests</a> I am left wondering what this certification proves and whether it&#8217;s truly worth it.<br />
<span id="more-547"></span></p>
<h2>The Test</h2>
<p>For those of you not familiar with the test let me break it down for you:</p>
<ul>
<li>70 questions</li>
<li>a combination of multiple choice (with multiple answers) and short answer</li>
<li>you get 90 minutes to complete</li>
</ul>
<p>The test is taken on a computer in true Who Want&#8217;s to be a Millionaire fashion, just without Regis. When done you are told whether you have passed or failed. Now the whole computer test thing is bugging me a little because I had an incident back in college where my laptop shit the bed <strong>during</strong> a programming final and I was only able to complete part of the test. But I&#8217;m sure the test producers have thought of all that <img src='http://www.christophermonnat.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<h2>What does it prove?</h2>
<p>If I displayed a big long code block here with 2 or 3 lines blanked out with question marks and then asked you to tell me what code should replace the question marks to achieve some final result, could you do it? That&#8217;s just one example of the questions asked on this test and I&#8217;m racking my brain trying to figure out what knowing the answer to that question proves. Does it show that I know PHP or that I just know the subject matter of that particular script? Or that I can understand confusing questions?</p>
<p>I think the question of what a particular certification really proves pops up now and then within the professional community when people try to put a weight to a specific accomplishment. Is it the difference maker between getting the job or being shown the door? I don&#8217;t necessarily think so but that&#8217;s a determination each person or company needs to make for themselves.</p>
<h2>Is it worth it?</h2>
<p>The test costs $125 and your free to spend anything above that on various preparation methods but all considered it&#8217;s a pretty cheap proposition. When you pass you are added to the <a href="http://www.zend.com/en/store/education/certification/yellow-pages.php">Zend Yellow Pages</a> and you get access to the Zend Certified Engineers LinkedIn group. You can also download a nifty badge to put on your blog and resume but overall these are nice perks. These are in addition to putting it on your resume and such as well which helps you get noticed by employers and bosses and such too.</p>
<p>So, is it worth it? I think so, but that&#8217;s a determination you will have to make for yourself.</p>
<h2>Wrap up</h2>
<p>Becoming PHP certified is a nice feather to put in your cap to differentiate you from the thousands of other PHP programmers out and about. What the questions actually prove is still up for debate but overall I think it will be a good thing. I&#8217;m taking the test on Friday so I&#8217;ll be sure to post a follow-up on the whole certification process next week.</p>
<p>Stay tuned!</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/45898756-0397-4e40-ab15-e8e7467d31e4/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=45898756-0397-4e40-ab15-e8e7467d31e4" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2009/03/im-a-zend-certified-engineerzce/' rel='bookmark' title='Permanent Link: I&#8217;m a Zend Certified Engineer (ZCE)'>I&#8217;m a Zend Certified Engineer (ZCE)</a></li>
<li><a href='http://www.christophermonnat.com/2008/07/what-does-you-code-say-about-you/' rel='bookmark' title='Permanent Link: What does your code say about you?'>What does your code say about you?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/03/zend-php-certification-necessary-or-not/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implementing Facebook Connect (Part 3) &#8211; Accessing Data from Facebook</title>
		<link>http://www.christophermonnat.com/2009/02/implementing-facebook-connect-part-3-accessing-data-from-facebook/</link>
		<comments>http://www.christophermonnat.com/2009/02/implementing-facebook-connect-part-3-accessing-data-from-facebook/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 16:00:41 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=479</guid>
		<description><![CDATA[About a month ago I posted a continuation of my Implementing Facebook Connect series on how to establish a connection to Facebook. In this post I am going to look at using that connection we established to access user data and render it on a page.

XFBML
Once you&#8217;ve established your connection to Facebook you now have [...]]]></description>
			<content:encoded><![CDATA[<p>About a month ago I posted a continuation of my Implementing Facebook Connect series on how to <a href="http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-2-establishing-a-connection/">establish a connection</a> to Facebook. In this post I am going to look at using that connection we established to access user data and render it on a page.</p>
<p><span id="more-479"></span></p>
<h2><span class="mw-headline">XFBML</span></h2>
<p><span class="mw-headline">Once you&#8217;ve established your connection to Facebook you now have access to a wide array of information, but to display this information you need to get familiar with </span>Facebook Markup Language (FBML), an extension to HTML. The cool thing with FBML is that you can access a lot of information without a lot of code. All you need is the FBML tag in your HTML document and that&#8217;s that.</p>
<h2>Rendering XFBML</h2>
<p>In order to render XFBML tags on your page you first need to add the appropriate doctype and HTML attribute to your document.</p>
<p><strong>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt; &lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xmlns:fb=&#8221;http://www.facebook.com/2008/fbml&#8221;&gt;</strong></p>
<p>The above mark-up is a standard doctype declaration. The only thing to note here is the XML namespace attributes added to the HTML tag. These are necessary in order to IE to render things appropriately so you don&#8217;t want to leave them out.</p>
<p>After you have the appropriate doctype declared you need to initialize the JavaScript Client Library from the Facebook site. This script basically contacts Facebook servers and tells them that you want to display FBML on the page in question and it&#8217;s up to Facebook to provide all the necessary tools to do so.</p>
<pre class="brush: javascript">&lt;script src=&quot;http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</pre>
<p>Finllay you need to send them your API key using the following script (which should be placed right after the above JavaScript include).</p>
<pre class="brush: javascript">&lt;script type=&quot;text/javascript&quot;&gt;
FB_RequireFeatures([&quot;XFBML&quot;], function(){
FB.Facebook.init(&quot;YOUR_API_KEY_HERE&quot;, &quot;&lt;relative path from root&gt;/xd_receiver.htm&quot;);
});
&lt;/script&gt;</pre>
<h2>The Tags</h2>
<p>OK, so now that we have the environment setup to recognize and render FBML we can review some of the tags and what they do.</p>
<h3>&lt;fb:login-button&gt;&lt;/fb:login-button&gt;</h3>
<p>The login-button tag should be familar from my last post. This tag renders a Facebook Connect log-in button on your site. When a user clicks the button they are presented with the Facebook log-in form in a pop-up window. When they log-in your application is added to their list of approved applications.</p>
<h3>&lt;fb:name uid=&#8221;user_id&#8221;&gt;</h3>
<p>The name tag does just what it&#8217;s mark-up would suggest, it displays the users name. This tag has one required attribute called uid where you need to provide a user id. You can also use this tag with Facebook Pages as well by passing the page id instead of the user id in the uid attribute. For more information about the name tag, visit the <a href="http://wiki.developers.facebook.com/index.php/Fb:name">Developers Wiki</a>.</p>
<h3>&lt;fb:pronoun uid=&#8221;user_id&#8221;&gt;</h3>
<p>The pronoun tag displays a pronoun for a specified user. Again, this tag has one required attribute uid for the user id. For more information about the pronoun tag, visit the <a href="http://wiki.developers.facebook.com/index.php/Fb:pronoun">Developers Wiki</a>.</p>
<h3>&lt;fb:profile-pic uid=&#8221;user_id&#8221;&gt;</h3>
<p>The profile-pic tag can display a users Facebook profile picture in a number of different ways. After providing a user id for the uid attribute you can also specify a size (like thumb, small, pic_square, etc.). For more information about the profile-pic tag, visit the <a href="http://wiki.developers.facebook.com/index.php/Fb:profile-pic">Developers Wiki</a>.</p>
<h3>&lt;fb:grouplink gid=&#8221;group_id&#8221;&gt;</h3>
<p>The grouplink tag gives you the ability to display group page links using FBML.  Simply provide the group id for the gid attribute and your all set. For more information about the grouplink tag, visit the <a href="http://wiki.developers.facebook.com/index.php/Fb:grouplink">Developers Wiki</a>.</p>
<h3>&lt;fb:eventlink eid=&#8221;event_id&#8221;&gt;</h3>
<p>The eventlink tag is similar to the grouplink tag except for events. Fed an event id for the eid attribute it will render a link to the specified events page within Facebook. For more information about the grouplink tag, visit the <a href="http://wiki.developers.facebook.com/index.php/Fb:eventlink">Developers Wiki</a>.</p>
<h3>&lt;fb:serverfbml&gt;</h3>
<p>The serverfbml tag is a very powerful tag that allows you to render FBML on Facebooks servers within an iFrame on your page. Using this tag you can interact with Facebook data through forms and such and it all takes place on Facebooks servers for security reasons. For more information about the grouplink tag, visit the <a href="http://wiki.developers.facebook.com/index.php/Fb:serverfbml">Developers Wiki</a>.</p>
<h2>Try it yourself!</h2>
<p>For additional information about the tags mentioned here and others I would recommend checking out the <a href="http://wiki.developers.facebook.com/index.php/XFBML">Facebook Developers Wiki</a>. You can try things out on your own, or Facebook provides a number of <a href="http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect#Intermediate:_Using_the_Facebook_Demo_Applications">demo files</a> available for download which use the tags mentioned above and others to help you get a better idea of what&#8217;s possible.</p>
<p>There is one post left in this series and I promise it won&#8217;t take me a month to post it. In this post we looked at accessing information from Facebook; in the final post we will look at sending information back to Facebook so stay tuned!</p>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-1/' rel='bookmark' title='Permanent Link: Implementing Facebook Connect (Part 1) &#8211; What is Facebook Connect?'>Implementing Facebook Connect (Part 1) &#8211; What is Facebook Connect?</a></li>
<li><a href='http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-2-establishing-a-connection/' rel='bookmark' title='Permanent Link: Implementing Facebook Connect (Part 2) &#8211; Establishing a Connection'>Implementing Facebook Connect (Part 2) &#8211; Establishing a Connection</a></li>
<li><a href='http://www.christophermonnat.com/2009/05/facebook-connect-library-for-codeigniter/' rel='bookmark' title='Permanent Link: Facebook Connect Library for CodeIgniter'>Facebook Connect Library for CodeIgniter</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/02/implementing-facebook-connect-part-3-accessing-data-from-facebook/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Implementing Facebook Connect (Part 2) &#8211; Establishing a Connection</title>
		<link>http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-2-establishing-a-connection/</link>
		<comments>http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-2-establishing-a-connection/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 12:00:01 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.christophermonnat.com/?p=379</guid>
		<description><![CDATA[Two weeks ago I took a look at Facebook Connect (FC) summarizing what it is and why developers would want to integrate it with their own applications in part 1 of this series. Originally I had thought this would be a two post topic but as I have learned more about FC I think it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago I took a look at Facebook Connect (FC) summarizing what it is and why developers would want to integrate it with their own applications in <a href="http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-1/">part 1</a> of this series. Originally I had thought this would be a two post topic but as I have learned more about FC I think it&#8217;s going to take a few posts to get up and running successfully. So, in this post we&#8217;re going to get all the pre-requisites out of the way and establish a connection with Facebook from our own application. We will then look at how we can do things with that connection in subsequent posts. Ready or not&#8230; let&#8217;s get started!<br />
<span id="more-379"></span></p>
<h2>Getting Started</h2>
<p>In order to use FC with your own application you first need to set your application up within Facebook so you can get your hands on an API key. As is the case when working with any API your API key will be used throughout your FC integration code for authentication purposes.</p>
<p><strong>Step 1 &#8211; Add Facebook Developers to Your Applications</strong></p>
<p>The first thing you need to do in order to set your application up within Facebook is add the Facebook Developers Application to your approved applications list. To do this, visit <a href="http://www.facebook.com/developers/">http://www.facebook.com/developers/</a>. Once you have added the developers application to your authorized applications list you will have access to all the developer resources that Facebook has to offer as well as a discussion board for questions and issues.<strong></strong></p>
<p><strong>Step 2 &#8211; Setup Your Application</strong></p>
<p style="text-align: left;">Now that you have added the developers application to your authorized applications list you can now proceed with setting your application up.</p>
<p style="text-align: center;"><a href="http://www.christophermonnat.com/wp-content/uploads/2009/01/facebook-developers.png"><img class="size-full wp-image-391 aligncenter" title="facebook-developers" src="http://www.christophermonnat.com/wp-content/uploads/2009/01/facebook-developers.png" alt="facebook-developers" width="500" height="209" /></a></p>
<p style="text-align: left;">Navigate back to the Facebook Developers application by visiting <a href="http://www.facebook.com/developers/">http://www.facebook.com/developers/</a> and click the <strong>Set Up New Application</strong> button at the top right of the window.</p>
<p style="text-align: left;">Now comes the fun part&#8230; setting up an application in Facebook involves a mega-form full of options and other required pieces of information. The form is fairly self-explanitory so I won&#8217;t take the time to go through it all with you. The only thing I will point out is the <strong>Connect</strong> tab. This section of the form concerns all the FC settings as they relate to your application. The only thing you need to concern yourself with at this point is the Base Domain field. &#8220;Specifying a base domain allows you to make calls using the <a title="PHP" href="http://wiki.developers.facebook.com/index.php/PHP">PHP</a> and <a title="JavaScript Client Library" href="http://wiki.developers.facebook.com/index.php/JavaScript_Client_Library">JavaScript</a> client libraries as well as get and store session information for any subdomain of the base domain.&#8221; Enter all the necessary information about your application and click <strong>Save Changes</strong>.</p>
<p style="text-align: center;"><a href="http://www.christophermonnat.com/wp-content/uploads/2009/01/facebook-edit-sign-up-sheet.png"><img class="size-full wp-image-394 aligncenter" title="facebook-edit-sign-up-sheet" src="http://www.christophermonnat.com/wp-content/uploads/2009/01/facebook-edit-sign-up-sheet.png" alt="facebook-edit-sign-up-sheet" width="500" height="203" /></a></p>
<h2 style="text-align: left;">Establishing a Connection</h2>
<p>Now that we have our API keys we can put the files in place that will help us establish a connection between our application and Facebook. I am having problems displaying code in my blog posts so for this post I&#8217;m just going to refer you to the FC <a href="http://wiki.developers.facebook.com/index.php/Trying_Out_Facebook_Connect#Basic:_Getting_Your_Site_and_Facebook_Connect_Working_in_Minutes">getting started guide</a> for the actual code to use. If any of you have any recommendations for tools to use to display code in Wordpress blog posts I would love to hear them.</p>
<p><strong>Step 1 &#8211; First the CCC File</strong></p>
<p>The first thing we want to do is create something called the <a href="http://wiki.developers.facebook.com/index.php/Cross_Domain_Communication_Channel">cross-domain channel communication</a> (CCC) file. That&#8217;s an awfully big name for such a little file. Basically this file provides the Facebook JavaScript Client Library with what it needs in order to function properly.</p>
<p>Copy the code from the FC getting started guide located under #2 and paste it into a new file named <strong>xd_receiver.htm</strong>. This file needs to be placed in a directory that&#8217;s relative to the callback URL that you entered when setting up your application in the mega-form above. For those of you following along using CodeIgniter, you should be able to get away with placing this file in the root of your CI application. That&#8217;s where everything is really referenced from anyway regardless of the search engine friendly URLs.</p>
<p><strong>Step 2 &#8211; Now the Test File</strong></p>
<p>Now that we have the CCC file we can begin writing the file we are going to use to establish our connection. Since we are only testing things in this post we will just make a simple file that displays the Facebook log-in button and adds the application to the users approved applications list. Go ahead and create a new file named <strong>test.htm</strong> and then follow along with the getting started guide starting with #3 for the necessary markup. Again, for those CI users you can place this markup in a view file and load it using whatever template your program is using.</p>
<p>Before running the script you want to be sure to replace <strong>YOUR_API_KEY_HERE</strong> with your API key and <strong>&lt;path from web root&gt;</strong> with the appropriate path to the CCC file. Once you have done that you can upload the two files we&#8217;ve created and test.</p>
<h2>That&#8217;s it!</h2>
<p>When viewing your test file in a browser all you should see is a Connect button displayed. When you click the button you should see a pop-up window prompting you to either login to your Facebook account or give your application permission to access your profile like in the screen shot below:</p>
<p style="text-align: center;"><a href="http://www.christophermonnat.com/wp-content/uploads/2009/01/fctesting.jpg"><img class="size-full wp-image-395 aligncenter" title="fctesting" src="http://www.christophermonnat.com/wp-content/uploads/2009/01/fctesting.jpg" alt="fctesting" width="500" height="395" /></a></p>
<p style="text-align: left;">Once you either login or give your application permission you can now go back to your Facebook account and look at the list of your authorized applications and you should now see your own application in the list.</p>
<h2 style="text-align: left;">What&#8217;s next?</h2>
<p style="text-align: left;">We didn&#8217;t get into much of the real nitty gritty in this post but we did lay the ground work for what is to come. In the next post I will begin looking at how we can access information about our users from Facebook and how we can send data back. Stay tuned!</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/407ca00b-3b52-4862-9121-70c0f91e6498/"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=407ca00b-3b52-4862-9121-70c0f91e6498" alt="Reblog this post [with Zemanta]" /></a></div>


<p>Related posts:<ol><li><a href='http://www.christophermonnat.com/2009/02/implementing-facebook-connect-part-3-accessing-data-from-facebook/' rel='bookmark' title='Permanent Link: Implementing Facebook Connect (Part 3) &#8211; Accessing Data from Facebook'>Implementing Facebook Connect (Part 3) &#8211; Accessing Data from Facebook</a></li>
<li><a href='http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-1/' rel='bookmark' title='Permanent Link: Implementing Facebook Connect (Part 1) &#8211; What is Facebook Connect?'>Implementing Facebook Connect (Part 1) &#8211; What is Facebook Connect?</a></li>
<li><a href='http://www.christophermonnat.com/2009/05/facebook-connect-library-for-codeigniter/' rel='bookmark' title='Permanent Link: Facebook Connect Library for CodeIgniter'>Facebook Connect Library for CodeIgniter</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.christophermonnat.com/2009/01/implementing-facebook-connect-part-2-establishing-a-connection/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
