Adding the Facebook Like Button To Your Site

Note: There have been some updates since I published this post so I give more current and specific information in this post: Adding the Facebook Like Button Revisited

Some pretty big changes are brewing over at Facebook and I’m working on a full coverage type of piece, but for today I wanted to jump in and cover one little change that makes some sense for you to consider right now.

Mark Zuckerberg FacebookFacebook has changed the idea of becoming a fan to something a little less committed – Like. Now you can like or recommend a fan page to your friends. The net effect is the same as your choice to like something is noted on your wall.

The big change is that Facebook wants you to start sharing your likes from anywhere on the web. Look for web publishers to start installing the FB like button on web sites, blog posts and in reference to individual items and products.

The video below gives an overview of the Like button installation process. You can use the FB tool easily get started or, if you know a little HTML and FBML you can do a fair amount of integration.

I’ve installed both the Like Box (over in the right sidebar) and the Like Button (in each post)

The code that is generated from the FB like tool gives you some flexibility but will only link to the page you give it. If you want to add a button as I have in each post you need to edit the code URL to include the WordPress < ?php the_permalink() ?> code for each individual post.

You can control some of what’s shown on a person’s wall when they click the like button by adding meta data to your page headers. Facebook is using the emerging Open Graph protocol to help this along.

The image below is another implementation of the Like button related to a specific product. In this case the format include pictures and details about who likes the product.

Update: To add the Like button to every post on a WordPress blog, as I’ve done here, open up your index.php and single.php files in the editor and add the code below to install the button. Add it above or below your post content depending on your preference.

This is the code you get from the Facebook Like button tool with the WP permalink added.

Image credit: Mark Zuckerberg – World Economic Forum

7 Insanely Useful Ways to Search Twitter for Marketing

This article originally appeared on American Express OPEN Forum and is one of the most retweeted articles I’ve ever written so I thought I would share it with you here.

7 Insanely Useful Ways to Search Twitter for Marketing

As a marketing tool Twitter gets much more interesting and useful when you can filter out 99% of the junk that doesn’t apply to your objectives and focus on the stuff that matters.

The basic functionality is fine for searching things that are being said about your search terms. The advanced search function offers more ways to slice and dice the stream, but still leaves some room for improvement as it only searches what’s being said and where. From a marketing standpoint who is saying it might be more useful.

Now that the search engines are all pretty geeked up over real time search you can create some very powerful searches and alerts combining Google and Twitter.

1) Target by occupation

Let’s say you have a business that sells an awesome service to attorneys. A simple search on Twitter will turn up thousands of mentions of the word attorney, but many of them will be from people talking about this or that attorney or the need to hire or not hire one. That’s probably not very helpful for your purposes.

However, if you cruise over to Google and use a handful of operators from the Google shortcut library (more on that here) you can create a search that plows through Twitter and gives you a list of all the users that have the word “attorney” in their title (username and/or real name) – Click on this search phrase and see what happens – intitle:”attorney * on twitter” – what you’ll find is a handy list of attorneys of one sort or another on Twitter.

Without getting too technical, this search basically asks Google to look in the title attribute of profile pages on Twitter – obviously you can use any word to replicate this. The * tells Google to find the words “attorney on Twitter” without regard to order or other words – “on Twitter” appears in the title of every profile page so we need that term to make sure we search profile pages only.

2) Target by bio

In some cases searching through the optional biographical information can be more helpful than the username or real name fields. Maybe you’re looking for a very specific term or some of the folks you are targeting only reference their profession in their bio.

Google search to the rescue here again. This time add the intext attribute, the word bio and our key phrase to search bios – So a search for web designers would look like this – intext:”bio * web designer” When you look at this list you might notice that none of the people on the list would have been found by searching in their title, as in the first tip, for web designer. Try it both ways to test for best results.

3) Target by location

Location search by itself is simple using the Twitter advanced search tool – if you want a list of people in Austin you would use this in Twitter – near:”Austin, TX” within:25mi and Twitter would use the location field to show you Austin Tweeters.

But . . . let’s say you wanted to target salons in Austin or maybe the whole of Texas – it’s back to Google to mix and match – (intitle:”salon * on twitter” OR intext:”bio * salon”) intext:”location * TX” – we search the title, bio and location to get a very targeted list of Salons in Texas on Twitter. Note the OR function for multiple queries.

4) New sign ups

Another handy thing about using any of the searches above is that you can also use the exact operators to create Google Alerts. By going to Google and putting in your search string as described above you’ll get everything they have now, but by setting up an alert you’ll get an email or RSS alert when a new attorney (or whatever you’re targeting) joins Twitter – I can think of some powerful ways to reach out to that new person just trying to find some new friends!

5) Keep up on your industry

Some of the best information shared on Twitter comes in the form of shared links. In other words people tweet out good stuff they find and point people to it using a link. I love to use a filtered Twitter search to further wade through research on entire industries, but reduce the noise by only following tweets that have links in them and eliminating retweets that are essentially duplicates – “small business” OR entrepreneur OR “start up” filter:links – this gets that job done and produces an RSS feed if I want to send it to Google Reader. Don’t forget the “quotation marks” around two or more word phrases or you will get every mention of small and business.

6) Competitive eavesdropping

Lots of people set up basic searches to listen to what their competitors are saying and what others are saying about the competition. I would suggest you take it one step further and create and follow a search that also includes what the conversation they are having with the folks they communicate with – not just what people are saying about them, but to them and vice versa – from:comcastcares OR to:comcastcares.

7) Trending photos

Photos have become very big on Twitter and the real time nature of the tool means photos show up there before they show up most anywhere. If you want to find an image related to a hot trend, or anything for that matter, simply put the search phase you have in mind follow by one of the more well known Twitter image uploading services such as TwitPic and you’ll get nothing but images. So, your search on Twitter might be – olympics twitpic OR (You can add more photosharing sites to expand the search).

There, Twitter just go way more interesting didn’t it?