A couple of days ago FaceBook made some big announcements at the 2010 F8 developer conference.   The Universal Like Button was the announcement that has everyone most excited.  So let’s take a look at how to add a like button to any web page.

How to Add a Like Button to a Web Page

First the good news – It is terrible easy.   Now the bad news – FaceBook does a bad job of explaining it.  Ready for more good news?  I am going to simply things for you!

There are two ways to add the Like button to your Website – with an i-frame or with JavaScript.   We will discuss the difference and also take a look at some of the available WordPress Plugins.

Adding the Like Button to a Webpage using a simple i-frame

The easiest way to generate the i-frame code is to use the tool provided by FaceBook.  The attributes used in the i-frame code are straight forward however it’s best to make use of the tool because it automatically URL Encodes (converts special characters) you’re Web page URL for you.

The code below which was generated by the Facebook tool could be placed on http://lyndonreid.com/contact (note the colon (:) and forward slashes (/) are URL Encoded).

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Flyndonreid.com%2Fcontact&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>

Adding the Like Button using XFBML and JavaScript

In order to use the XFBML you will need to reference the FaceBook JavaScript Library. You can simply  copy and paste the code that follows into the footer of your web page (or anywhere inbetween the opening and closing <body> tags) .  The code will load the JavaScript library from FaceBook at the same time as the rest of your site loads (asynchronously) meaning it will not block or slow the loading of the rest of your website.

<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'your app id', status: true, cookie: true,
xfbml: true});
};


(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>

Once you have the following code added to your webpage you can simply use the FaceBook tool to generate your XFBML or edit the code below and copy and paste it into your web page.

<fb:like href="http://lyndonreid.com/contact" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />

The benefit of using the XFBML is that users will have the option to comment when they “like” your page.  The i-frame version does not provide this functionality.

Adding the Like Button to a CMS

If you use the XFBML version of the code it’s quite simple.  You will load the JavaScript library on each page and then modify <fb:like /> tag to reference the current page.  Following are two examples, one that use PHP and one that uses VB.NET.

PHP

Note: this script assumes your site is running on http:// and not https://.
<fb:like href="<?php echo "http://" . $_SERVER['HTTP_HOST']  . $_SERVER['REQUEST_URI'];?>" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
<fb:like href="http://lyndonreid.com/contact" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />

VB.NET

<fb:like href=”<%=Request.UrlReferrer.ToString()%>” layout=”standard” show_faces=”true” width=”450″ action=”like” colorscheme=”light” />
<fb:like href=”http://lyndonreid.com/contact” layout=”standard” show_faces=”true” width=”450″ action=”like” colorscheme=”light” />

Adding the Like Button to WordPress

There are two pluggins available already.  The plugin available at Kouguu.net allows for some customization via the control panel.

Smoking Gunn: http://blog.gunnjerkens.com/2010/04/facebook-like-plugin-for-wordpress/
Kouguu.net:  http://www.kouguu.net/?p=1

Adding the Like Button to a Thesis Themed WordPress Site

If you are familiar with the way hooks work within thesis then this will be really straight forward and you may not require this explanation.  If not, here you go J

Again, you can choose to do this with the XFBML of the i-frame version of the code.  I am going to show you how to do it the XBFML version as allowing you visitors to comments on posts they “like” is a nice touch.

We are going to add two hooks.  One for the actual button and one to load the required JavaScript.

You are going to edit you custom_functions.php file which can be found at:
\wordpress\wp-content\themes\thesis1.6\custom\custom_functions.php

Add the following lines to the top of the file:

add_action('thesis_hook_before_post','add_facebook_like_button');
add_action('thesis_hook_after_footer','add_XFBML_JavaScript');

Add the following to the bottom of the file:

//the following function will allow the facebook like button to display on every post
<div id="fb-root"></div>
function add_facebook_like_button() { ?>
<div style="width: 100%;">
<fb:like href=""<?php echo get_permalink($post->ID);?>" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" />
</div>
<?php
}


//the following will load the FaceBookJ avascript Libraray
function add_XFBML_JavaScript() { ?>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({appId: 'your app id', status: true, cookie: true,
xfbml: true});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script><?php
}

The FaceBook like button will now appear at the top of every post in your Thesis themed WordPress blog.

Summary

Adding the FaceBook Like Button to a Web page is very simple. If you have any issues adding the button to your Web site leave a comment below and I reply with in few hours.  If you found this article useful, please scroll to the top and click the like link and tweet it :)

{ 47 comments }

WebHost4Life Sucks

by Lyndon on April 19, 2010

A Customer Service Fail of EPIC Proportions

I’ve been hosting a number of small sites across a number of accounts for a number of years with WebHost4Life.  For the most part the service has been what you’d expect out of a low cost hosting company – not great but not that bad.

While things changed.  Holy crap what a piece of shit company.  They are in the process of migrating all servers to new technology and today one of my accounts was migrated.

I get an email letting me know it’s been completed. I go check out the site nervously.  Boom, Error, the connection string for the SQL Server Database is incorrect. I contact Live Chat Support they tell me they have forwarded my request to Technical Support and “Hang Up” on me.

So I hit the Live Chat Button again.  They tell me I will need to wait 24-48 hours.  Craptastic.  Here is the dialog:

Melanie Evans: Hi Lyndon. My name is Melanie, how are you today?

Lyndon Reid: Hi Melanie

Lyndon Reid: My sites were migrated today and are not working

Melanie Evans: I apologize for any inconvenience this has caused you.

Lyndon Reid: I need this fixed

Lyndon Reid: please

Lyndon Reid: :)

Lyndon Reid: Hello?

Melanie Evans: May I place you on hold while I look into this for you? I should have some more information regarding your issue in 4-5 minutes.

Melanie Evans: One of our agents already escalated your issue to our specialists.

Lyndon Reid: He hung up on me so i was unaware

Melanie Evans: Our engineers are working on it.

Lyndon Reid: How long until i can expect a reply

Melanie Evans: It will take 24 – 48 hours to resolve your ticket.

Melanie Evans: I will give the highest priority.

Lyndon Reid: That is really unfair

Lyndon Reid: My entire site is down

Lyndon Reid: Because of something you guys did

Lyndon Reid: and now i have to wait

Lyndon Reid: worse yet you are trying to upsell service packages

Melanie Evans: Yes.

Melanie Evans: I apologize for any inconvenience this has caused you.

Lyndon Reid: Your serious, I have to wait for up to 2 days?

Lyndon Reid: This will affect my google rankings negatively

Lyndon Reid: This means two days with NO EARNINGS

Melanie Evans: I can understand your concern.

Lyndon Reid: If your company understood my concern they would do something faster

Melanie Evans: I assure that it will be resolved soon.

Lyndon Reid: thank u

End of Conversation

The best part.  I go to open a ticket myself.  Check out the screen shot.  I can pay $30.00 a month for faster service.  This is new, since the migration.  So they destroy my site and then charge $360 a year for service.  What a freakin joke.  I wish upon them, with the white hot intensity of a thousand burning sounds, complete and total failure and bankruptcy.

WebHost4Life Sucks

WebHost4Life Sucks

If you are reading them and looking for a host a would recommend stabbing yourself in the left eye with a ballpoint pen before giving this self serving pricks your business.

Love you (no not you WebHost4Life, everyone else that reads my blog).

PS:  Isn’t great that I can put a blog post up faster than they can fix a minor issue?

{ 22 comments }

PubCon Dallas Photo Gallery

by Lyndon on April 18, 2010

My camera was out and in use by many of us all week at PubCon South in Dallas. 

It was an amazing week for a lot us and I did my best to catch it all you could remember the “blurry” nights.  Go spot yourself and retweet this will ya?

You know the rules: If you don’t like a picture, just let me know and I will take it down immediatly.  If you like a picture and want a high resolution copy just get in touch and I will send it to you as soon as possible.

Check it out:  PubCon Dallas 2010 Picture Album

See ya in Vegas.

{ 1 comment }

Quick Recap of Pubcon Dallas

by Lyndon on April 18, 2010

So, I ended up making it to Pubcon Dallas.  What a great week.  I always have tonso fun at Pubcon and this was no exception.

Dinner at Pubcon Dallas

Dinner at Pubcon Dallas

For those of you who have not been to a “PubCon South” it is a smaller more intimate show than “PubCon Las Vegas”.  I appreciate both for what they offer – the Vegas show offers thousands of people and complete chaos at parties.  Everyone knows I love to party, so this works well for me.  South on the other hand offers an intimate feeling and the opportunity to meet new people and spend more time with them.  Don’t get me wrong, we still party hard though. At South I was able to meet and develop relationships with several people, some of who will likely be longtime online and offline friends.  I am already anxious for Pubcon Vegas just to reconnect.

With fear of sounding repetitive I am not going to do a day by day recap.  The conference involved great sessions, great networking, great meals with great people, dozens and dozens of hours at the Fox and Hound, a party put on DFWSEM at Humperdinks, and finally lots and lots of laughs.

I took a thousand plus pictures and hope to have them posted in the next day or two.  Watch the blog J

If you were there and we met make sure you tweet, text, or email me.  If we didn’t meet, I am sorry, and let’s get in touch now.

I love you all.  A lot!

{ 6 comments }

Yahoo Powered by Bing

by Lyndon on February 20, 2010

A couple of weeks I recommended looking at optimizing for Bing and mastering AdCenter.  The reasoning, I expect Bing to gain a lot of market share, it might not overtake Google but I’d bet the days of a 5-10% market share for Microsoft’s search platform are long gone.

Microsoft recently announced department of justice clearance for the Search Alliance.  What does this mean?  AdCenter will power YSM and Bing’s algorithms will power Yahoo search results.

Let’s take a look at the effect this will have – assuming no growth for Bing (Bing will grow):

Google has 66% of the market
Bing has 8% of the market
Yahoo has 17 % of the market

By the end of the year Bing will be able to offer you about 40% of the exposure that Google can!

I’ll say it again if you are PPC Ninja start playing with AdCenter, if you are a SEO start Optimizing for Yahoo, if you are smart just keep building quality products and you will be fine :) .

{ 7 comments }

Awww… Google Loves Me

by Lyndon on February 14, 2010

Happy Valentines Day to me.  Talk about the best Valentines Day Gift ever.  Okay, maybe a few links would have been better ;-) .  But I’ll take an Adsense credit any day.

Valentines Day Card From Google

Valentines Day Card From Google


Inside of Valentines Day Card from Google

Inside of Valentines Day Card from Google

Envelope and Front of Valentines Day Card from Google

Envelope and Front of Valentines Day Card from Google

{ 0 comments }

Bada-Bing Better Start Mastering AdCenter

by Lyndon on February 4, 2010

Bing Search Engine Screen Shot

Bing Search Engine Screen Shot

Nostradamus himself predicts a big push from Bing.  I personally hate but all they would have to do to get me using it here or there is clean things up a bit.  I find their background gradients and pictures terribly distracting and annoying.  Yeah, I am picky, whatever rip me for it if you like.

Anyway Bing stands a chance to gain market share for a few reasons:

  1. Their results are actually good
  2. They results don’t have as much noise (maps, tweets, images, videos, etc.) in them
  3. They are apparently buying their way into the browsers as the default search engine (Google currently has/had FireFox and Safari)

There was a time I was paying .04 to .08 cents a click on Facebook while everyone was ignoring Facebook’s advertising platform – I’d trade my house to pay .04 cents a click again.

Another opportunity *may* present itself.  Go exploit it.  Come back and thank me later.

Everyone has been concentrating on ranking and rocking Google SERPS and Paid Search.   In December 2009 Microsoft was accounting for about 10% of searches.  If this grows as some expect there could be huge opportunities in the AdCenter game.  Start playing now, master it in time, drive some killer affiliate stuff, and then enjoy the 12 months of record revenue.  Before you know it everyone will be in there and it will be too late.

{ 3 comments }

We Can Beat It

by Lyndon on February 3, 2010

A while back DK asked us to throw up a quick post about the charity we prefer to support.  I posted that mine was the Canadian Breast Cancer Foundation.

Sadly, it’s rare I hear of someone who has not been affected by breast cancer.  I never got to meet my grandma because breast cancer took her away from me and my mom while she was pregnant with me.  My aunty is also battling and beating breast cancer.  Some of my best friends in the internet marketing industry have family members fighting breast cancer right now (I think of you guys every day) and some friends of mine have had some really tough battles as of late.

In December I said that I would donate $500.00 to the Canadian Breast Cancer Foundation if I won Shoemoney’s Affiliate Summit West contest.  I managed to pull it off and I’ve made my contribution to the fight against breast cancer.  Better yet, charity goddess Missy Ward and DK ran a fundraiser for the National Breast Cancer Foundation.  I eagerly sponsored and participated in the fundraiser.   I am extremely proud of Missy and DK and thrilled to report they raised over $15000.00.

As they say, we are in this together.

Mom, aunty, friends, marketers, and everyone touched by this terrible disease I am thinking about you today.  Visitors, please consider giving generously to the Canadian Breast Cancer Foundation.

And, men you should go donate as well – Save the Boobies.

{ 3 comments }

Goal Review – January 2010

by Lyndon on February 1, 2010

This post is a monthly follow-up to my 2010 goals.

Woah – January was a success.  I am sure  my earnings are down from December (a lot of my affiliate stuff is done through eBay and the Christmas season where all the money is made) but a lot of excellent things have happened.  I won’t reiterate as it’s all on the blog.

Okay let’s take a quick look at the goals:

  1. Earnings of $1K a day through the monetization of web sites by the end of the year
    My earnings are down and far from $1000.00 a day but I have a few things on the go and a few of them are big with huge potential.  I hope to launch one of them in the next 30 days.  I returned from ASW with a new attitude – I am now concentrating on things that can be huge.
  2. Get/Stay in shape.  Keep “bad” weight off and put “good” weight on (ultimately I’d like to lost 5-10 bad pounds and gain 5 good pounds)
    My training has been sporadic but I am probably a few pounds lighter.  I’m stocked up on food, supplements, and ready to keep given ‘er.
  3. Workout 4-5 days a week
    Been averaging about 4 days a week.
  4. Continue to be a great friend, uncle, and family member, and dog owner
    For the most part I think this is going well.
  5. Wear my seatbelt all the time (when I am in a moving car)
    Umm, this one is easy.  I am getting way better.
  6. Pay off all consumer debt
    Haven’t even looked at this yet.
  7. Stop hitting “sleep” on the alarm clock
    I am guilty here.  I struggle with this.  I do know I feel great when I get up right away.  I end up groggy all day if I hit sleep too much and so I am going to jeep working at this.
  8. Wake up at 5:45 am
    See above.
  9. Be a productive employee
    I had a good month at the office.
  10. Be a productive entrepreneur
    Doing much better in this department. Social media is becoming less of a distraction.  I was up until 4:00 am yesterday coding a new product. I’ve hired a developer who I think is going to work out well.  Definitely making forward progress here.
  11. Sleep between 6-9 hours every night
    I am getting better here, still a little inconsistent.
  12. Run the half marathon with minimal training (I’m not going to put on “good weight” running all the time)
    Still debating this.
  13. Post on my blog every once in a while
    Success.
  14. Keep better books
    eeekkkk.

All in all I am moving forward in the right direction. I am super motivated.  These monthly reviews are going to work well for me, it will ensure these goals are not forgotten.  It is a reminder that I need to continue to work at certain things.

{ 2 comments }

So, last month I won a contest hosted by Shoemoney and sponsored by Epic Advertising.  They gave me $2000 to throw down on a single hand of black jack – I ended up hitting a black jack  – it was ummm EPIC, John Chow even caught it on film.

Lyndon Reid and Shoemoney at Azoogle Booth Ready to Bet

Lyndon Reid and Shoemoney at Azoogle Booth Ready to Bet

Then they let me join them at their party as well.   Again, it was a big deal (read as EPIC), they booked the Hugh Heffner Sky Villa Suite at the top of the Palms Hotel in Las Vegas (yep the one you see on TV all the time) and threw a killer party.  Everything you’d expect – networking, open bar, beautiful people, great views of the strip, and killer music.  It was the most anticipated party of Affiliate Summit West and it proved to be toughest to get into.

Everyone is aware that they threw an out of this world party last year,  at the Playboy Mansion in LA.  It had everyone talking.  I even mentioned in my ASW contest entry that I was hoping I’d be able to find my way into their next mansion party. Here is what a few people had to say:

DK states “THE BEST PARTY I HAVE EVER BEEN TO.”

Shoemoney says: “ It was a unreal experience

Well guess what?  They are pulling out all the stops and hosting another party at the mansion in August.

Affiliates, especially super affiliates, often stress that marketers should follow the money and not get caught up in the contests networks hold.  What Epic advertising does is an exception to that rule and pretty much everyone knows it.  We all want to win their contests.  It doesn’t matter if you are male or female, if you are 21 or 81 years of age – chances are you’d love to party at the mansion and god knows it’s one of those once in a lifetime opportunities that will leave you with stories and memories that will be retold thousands of times.

Hurry over to Epic/Azoogle and register to win.  I’ll be doing everything I can to get an entry.

{ 4 comments }