How to Make Secure (SSL) Facebook Fan/Business Pages for Free

Facebook fan/business pages provide enormous potential for spreading business, connecting with your customers, engaging your customers, and marketing pretty much anything.  Over the last couple years, the process of creating an effective page has changed quite a lot.  One big strategy to get people to like your page is to show one thing to get people to like it, and another thing once they like the page.  This is essentially the same as building a landing page when trying to sell a product/service online.  This allows you to give incentives for people to like the page and engage with you.  You used to be able to create pages using FBML, but that faded out to iframes.  Additionally, as of October 1, 2011, you now also have to use a SSL (https) URL.  Contrary to what you may think, all of this can still be done relatively easily for free.  This article is accurate as of January, 2012 (in February, Facebook will be getting rid of Facebook App Pages, so this will likely change yet again).  This entire process will take about 5 minutes to do, aside from the time it takes you to design/build the landing page itself.

Step 1:

Create your page.  You can do this by visiting http://www.facebook.com/pages/manage . Click on “Create a Page” in the upper right.  You can also manage existing pages on this page.

Step 2:

Create your landing page.  You will want to create a page and host it on your own server, which will later be iframed into your Facebook page through your Facebook app (see Step 3).  You want to design your landing page such that it is a max of 515 pixels wide, because that is what fits into Facebook.  If it is any wider, the user will have to screen in an iframe, which tends to be a poor experience.  Additionally, it is beneficial to have your landing page show 1 page to users who haven’t liked your page, and another page to users who have liked it.  Checkout McDonald’s Facebook page for example.  To do this, you will want to create a new file with the following code:

<?php

require ‘facebook.php’;

// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
‘appId’ => ‘APP ID‘,
‘secret’ => ‘APP SECRET‘,
));

$data = $facebook->getSignedRequest();
?>
<!DOCTYPE html>

<html lang=”en” dir=”ltr”>
<head>
<meta charset=”UTF-8″ />
<title>Title of Your Site</title>
</head>
<body>
<?php if ($data['page']['liked'] == 1): ?>
<p>This is the content shown when someone likes your page.</p>
<?php else: ?>
<p>This is the content shown before someone likes your page.</p>
<?php endif; ?>
</body>
</html>

Note: you will need to replace APP ID with your application ID and APP SECRET with your app. secret later on in step 3.

You will want to replace the content in red with what you want as your landing page for people who have already liked your page, the content in green for users who are yet to like the page, and the purple text in the <title> tags with the title of your page.  I typically just make an image that is 520 x 630px or so with my content, and then just vary the content depending on whether the page is liked or not.  Name this file index.php, and then upload it to your server, such as domain.com/facebook/index.php.  Next you will need to download a few files that Facebook created to make this work.

Go to this URL and click “Download as Zip”:
https://github.com/facebook/php-sdk/downloads

In the “src” folder, you will find 3 files (base_facebook.php , facebook.php, and fb_ca_chain_bundle.crt). Upload the 3 files onto your server, into the same directory as your index.php .  So you should no have these 4 files on your server:
domain.com/facebook/index.php
domain.com/facebook/base_facebook.php
domain.com/facebook/facebook.php
domain.com/facebook/fb_ca_chain_bundle.crt

Step 3:

Create an application to interact with your page.  You do this by visiting http://www.facebook.com/developers . You will have to go through and accept the terms/allow access, and then click “Click New App” in the upper right.  You’ll need to choose the app display name and the namespace, and agree to the terms and conditions.  In the next page, these are the fields you want to fill in:
App Display Name: Name it the same name as your Facebook fan page.
App Namespace: Name this anything, keep it short and simple.
Email: Use your contact email.
(Under Page Tab) Page Tab Name:  Put in something like “Like Us!”.
Page Tab URL: This is the page you have hosted that is ifram’ed (domain.com/facebook/index.php).
Secure Tab page URL: Here you have to put a secure (https) URL.  This typically costs money – however, a site called Social Server has a service to satisfy this for free.  In this field, you want to put “https://secure.social-server.com/v2/” (without quotes).
(Under App on Facebook) Canvas URL: Enter the URL of your iframe page, but as a directory.  So using the example from step 2, you want this URL to be domain.com/facebook/ .
Secure Canvas URL: You want to use the Social Server again here, and put in “https://secure.social-server.com/v2/” (without quotes).

Then click Save Changes.  Now what you need to do is connect your app to your fanpage so they can talk to eachother.  To do this, copy this URL:

https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL

Replace YOUR_APP_ID with the app ID, which can be found by going to facebook.com/developers and clicking on edit app (the app ID is shown at the top).  Replace YOUR_URL with your page tab URL you filled in above.  Additionally, you need to now go back to your index.php file on your server, and edit the APP ID and APP SECRET pieces at the top.  Your APP SECRET can be found by editing your app (the app secret is just below the app ID at the top of your edit app page).

Step 4:

Go to your Facebook Fan Page now and refresh.  On the left, you should now see a new tab called “Like Us” or whatever you named the Page Tab.  Click on that, and at the top where it says “enter page URL”, enter the URL to your page you want iframed – domain.com/facebook/index.php from the example above.  Then refresh the page.  Make your landing page the default page that users land on when they visit your page.  To do this, go to your Facebook Page and click Edit Information.  On the left, click on “Manage Permissions”, and then by “Default Landing Tab” change it to “Like Us” or whatever you named the “Page Tab Name” in step 3.

And that should be it.  You should now have a Facebook Fan page up and running, showing different content to users who have liked your page and those who haven’t.  You also have full control over the these landing pages, so be creative. Having a unique, attractive Facebook Fan landing page can greatly increase the number of likes your fan page gets.  Here is a video explanation of this process (with a few details left out/changed since the video a bit older and Facebook’s platform has changed since).

If you have any questions or comments, don’t hesitate to comment below and let me know.

Share this post!

Jan 26th, 2012 | Filed under Advertising

Challenge Yourself for 30 Days to…

Several months ago, I was browsing the web and one of the blogs I normally read is by Matt Cutts, an engineer at Google.  He was blogging about his various 30 day challenges – why he does them, and what they are.  He even did a short TED talk on them here:

Is there something you’ve always meant to do, wanted to do, but just … haven’t? Matt Cutts suggests: Try it for 30 days. This short, lighthearted talk offers a neat way to think about setting and achieving goals.

It had me pondering, what 30 day challenges would I like to do? I compiled a list of a few off the top of my head that I’d like to do, purely for fun, to either test myself, push myself, or benefit myself for 30 days (or more):

  • No alcohol for 30 days
  • No candy for 30 days
  • No TV for days
  • Sleep an hour less everyday for 30 days
  • Work an extra hour every night for 30 days
  • Run everyday for 30 days
  • Ride my bike everyday for 30 days
  • Write every day about something I like for 30 days
  • Setup an advertising campaign each day for 30 days
  • Change the world each day for 30 days – giving to charily, picking up trash, planting a tree
As mentioned in the speech, it can be something you add to your life like running or reading, or something you subtract like TV, candy, or alcohol. One of the things that makes the 30 day challenge even more appealing is that it makes 30 days memorable. Since time will pass no matter what, why not try something new that you will remember?  I think I will give some of these ago this year.  Why don’t you?

Share this post!

Jan 19th, 2012 | Filed under Adventures

Trip Report: Hungry in Hungary – Budapest

This post is long overdue, and has been in the queue for several weeks.  Nevertheless, I enjoy writing reports and re-reading them in the future.  Unfortunately, if I don’t write them immediately when I return from the trip, I have to think hard about the notes I’ve scribbled down to try reconstructing the trip.  Better late than never, so here we go.

In late September/early October, Sophie and I decided to book a small vacation when I visited her in England from early Nov, 2011 to early Jan, 2012.  We searched for several days on teleholidays.co.uk and found an excellent deal to Budapest (from Manchester, UK) for a few nights.  Originally we were going to do the vacation during Sophie’s 21st bday weekend in early Nov, but changed it to early December because it worked out better – we would have more time to go since Sophie’s semester would be over and it wouldn’t overlap with the UK Open Rubik’s competition in Bristol.  In the end, we ended up booking a night vacation for 4 nights at a 4 star hotel in central Pest (east side of Budapest).

On December 9th, we woke around 7:30am, got ready and called for a taxi around 8:15am so we could catch a 9am train out of Leeds to Manchester airport to catch our 1pm flight Manchester-Budapest.  The taxi ended up arriving 20 minutes late, but we were still able to catch our train without a problem.  Upon arriving at the Manchester Airport, we discovered that because we didn’t checkin to the airlines the day before, we had to pay insane fees.  Jet2 ended up charging us £17.50 each for simple checkin/printing boarding pass, and then another £30 charge to check 1 bag.  If we would have known about these, we certainly would have checked in ahead of time – more on this later.  After that ordeal, we ate some lunch at Giraffes at the airport, which was quite tasty.

So after paying £65 in fees (which was nearly more than our original cost of our flight), we boarded our flight to Budapest.  Upon arrival in Budapest, we paid 17 EUR for a 1 way journey for the two of us to our hotel in Pest, Ambra Hotel.  After a 40 minute ride there, we brought our reservations to the front desk and began to checkin.  We were super excited because the hotel seemed very nice and was in the middle of the city.  However, the front desk told us they had no reservations for us and that the hotel was booked (it was a Friday night at 8pm or so).  We wondered how that was at all possible.  After looking into it more, we found that the agent we booked through, www.airborn.co.uk (Airborn Direct), had ceased operation back in late October, just 2 weeks after booking our vacation (but we weren’t in anyway notified).  So, the friendly Ambra Hotel staff helped us book a hotel outside of the town in Buda, and we had to re-pay for our hotel reservation at the Mercure Buda.  Luckily we were able to get a pretty nice room at a great price of 50 EUR a night.  So we took the metro across town into Buda and checked into our new hotel.  Oddly, Airborn Direct/Holiday Hero still had booked the flights, but did not make the reservation.  What an adventure that day was.  After relaxing a bit, we decided to eat at the hotel for 18 EUR/person, but the food was superb and was very satisfying.  After dinner we called it a day.

On Saturday we woke around 9am to catch the complimentary breakfast before it closed.  The food was good, but it seemed that a lot of the food was gone (as if we came too late).  After eating, we headed back to the room to grab our bags for the day and then walked around Buda, and along the Danube for a couple miles.  Unable to find anything too apetizing for lunch, we went into a unique market (that looked like a bank from the outside) to buy some food.  We ended up buying some drinks, some candy, and some snacks.  After that we walked around Buda more until it was dark, and then went back to the hotel to put some things into the room.  After, we set off to dinner and came across a Chinese place that was in Hungarian – we didn’t recognize a word on the menu, and used only pictures to decide what to order.  The funny thing was that after ordering, the woman there grabbed it from the tray, tossed it into the microwave, and gave it to us.  We got like 3 dishes to share for 1 EUR for each dish.  The food wasn’t bad for 1 EUR, but we found the microwaving hilarious.

On Sunday we decided to explore Pest (pronounced Pesh-t in Hungarian).  We walked all through the city side of Pest, in and out of Christmas markets, and along the many shops and malls there.  We stopped and ate lunch at a place just near St. Stephen’s Cathedral.  Sophie and I ate Goulach (which was very oily), and I also had a chicken sandwich.  After lunch we continued north in Pest, along the river and near the famous parliament building.  I found it strikenly similar to the parliament in London, and later found out it was a replica (aside from the dome on top of it).  Before we knew it, it was dark and we headed back to the hotel to rest our legs a bit.  After a short break, we headed out to northern Buda to explore the area.  We found a large shopping mall (Mammut Mall) that seemed massive, and was actually very busy for a Sunday late night – we were surprised.  We explored the food court, and ended up eating at a Greek (I think) place.  I looked at the prices and found some stuffed pancakes I liked.  Because they were only 2-3 EUR each, I thought they would be small, so I ordered 2.  To my surprise, they were massive, but tasty.  Sadly I was unable to finish them, but it was a good learning experience at least.  After dinner we walked more of Buda on the way back to our hotel, and then called it a night.

On Monday, we woke early and went down to grab some breakfast at the hotel.  We wanted to wake early to get breakfast before everyone else, and also get started for the day.  After breakfast, we went back to the room and showered and got ready.  We then walked around Buda more, and checked out the Mammut mall again during the morning.  Around lunch, we took a back route and walked toward the Danube to a restaurant we saw a few days earlier, Trofea.  On Mondays, they have a lunch deal – all you can eat and drink (including wine and beer) for 3,750 HUF each (10 EUR).  We wanted to try it out, so we ate lunch there.  Our plan was to eat lunch, and then catch a walking tour near St. Stephen’s Cathedral at 2:30pm.  The lunch at Trofea was excellent.  I had a couple pints a beer, and when Sophie ordered some wine, they brought her out a carafe of wine.  We ended up eating 3 courses, and had some mulled wine: salad, venison, lots of chicken, shark, grilled vegtables, and an excellent dessert.  We couldn’t have asked for more, especially considering the price.  After lunch, we hurried to the cathedral and made it just in time for the tour the start.  We ended up walking with the tour for a few hours, and before we knew it, we were on top of the hills in Buda overlooking the Danube and Pest, and it was 6pm.  After the tour, we walked back to the hotel to relax, and then headed to the Mammuk mall area again to grab dinner at La Taqueria, a Chipotle-like burrito place.  The food tasted quite good and was cheap.  After dinner it was drizzling rain so we went to the hotel and watched some movies.

On Tuesday, we woke early and ate breakfast again, and then went out and about.  We had to checkout by 11am, and had to catch a taxi to the airport around 2pm, so we walked to the top of a hill in Buda again for a daytime overlook of the city.  After snapping some pics, we went into various souveniere shops, and then grabbed lunch at some grill.  We both got a hamburger, which was very unique to say the least.  It was on a massive bun, and it was incredibly salty (apparently Hungarians on average consume like 9x the recommended daily intake of salt).  After eating, we walked around the area a bit more, and then headed back to the hotel to catch a taxi, which cost 6,500 HUF.

The flight was fine.  Once landing, I got stopped a UK Customs for about an hour.  When I entered into the UK in early Nov. of 2011, the same thing happened.  They were questioning how I could afford to take a vacation to the UK, and why I was in the UK in the first place.  Because I didn’t know Sophie’s exact street address, they thought I was lying.  Anyways, because of the long delay Sophie and I missed our train from Manchester to Leeds, and had to wait for an hour to catch the next one.  Once on the train, everything went smooth, until we had our tickets checked.  Apparently Sophie was carrying her old railcard, so she was fined for a new ticket of £22 (we paid £6 for our tickets orginally).  It sucked, and somewhat summed up all the bad luck of the trip.  Once we got to Leeds to took a taxi to Hyde Park, grabbed some food, and then headed home.

Overall, neglecting the fact of what we were fined, the trip turned out well and we both had a great time.  Budapest is an awesome city, and I’ve long wanted to visit there.  In regards to the www.airborn.co.uk deal, we have filed a claim with the CAA (Civil Aviation Association) to get our money back on the hotel reservation that was never made.  Our flights were also not checked in (which ended up costing us £65), and we would have been notified that we had to checkin if the company didn’t cease operation.  However, we didn’t file a claim for that because we should have known to checkin anyways.  Word of advice: always pay on a credit card for extra protection of your money.  If we had paid with a credit card, we would have got our money back without having to file a claim and hope for the best.

I’m now back in the US, after returning from 2 months in England last Thursday.  I’ve made some nice goals for 2012, and have been working on some fun projects.  I look forward to blogging about them in the months to come.  Happy 2012!

118 Photos – Hungry in Hungary Facebook Album
Daytime view of City – Video 
Weird Curtains for Entry/Exit of Store in Budapest – Video

Share this post!

Jan 12th, 2012 | Filed under Adventures

The Science of Motivation

Lately I’ve been interested in reading books on business, money, life, motivation, and other intriguing topics.  I’ve always read a lot online, but rarely would buy a book to sit and read.  After getting many suggestions recently, I’ve become interested in reading more offline.  I’ve gathered a decent a list of books that I will purchase soon, and am currently reading “Good Strategy, Bad Strategy”, which analyzes how strategy affects business.

While searching for other books to read in the future, I came across a book called “Drive: The Surprising Truth About What Motivates Us” by Daniel Pink.  The title seemed interesting, and the summary did as well.  After reading some reviews, I came across a TED talk that Daniel gave on the science of motivation in 2009.  It gives a convincing analysis of motivation, incentives, and results and compares traditional 20th century motives and models to 21st century – and is summarized as:

Career analyst Dan Pink examines the puzzle of motivation, starting with a fact that social scientists know but most managers don’t: Traditional rewards aren’t always as effective as we think. Listen for illuminating stories — and maybe, a way forward.

It is an 18 minute talk, and is well worth the time if you have any interest in what I’ve said above.  You can watch it below, or at this link.

Share this post!

Jan 7th, 2012 | Filed under Other