Category: HTML/CSS

Better Facebook statuses with links

Having links, photos or videos in your Facebook status updates is shown to increase engagement by your fans. When there is more than just a plain text status update you are more likely to capture your audience’s attention and stand out in their news feed if you have an interesting visual element.

Facebook auto-generates a thumbnail or small image preview when you include photos or videos in your status updates. If you are linking to a webpage in your update (which you can do by simply pasting the URL into your status), Facebook will create a preview of that link to include with the status by looking on that page for a suitable title, description and image to use as the thumbnail. The title and description of the preview typically come from the page title and the first bit of content on the page. The image is pulled from anywhere on the page that Facebook thinks is a suitable image. If there are no images found on the page you are left with just text, which is not as intriguing for your fans.

You can assure that there’s always an image to include by using one of two methods: adding an “image_src” link tag to the head of your HTML document, or by including an appropriate image on the page (this can either be included to supplement the content of the page or hidden from view with a bit of CSS styling).

The syntax for adding the image_src link is:

<link rel="image_src" href="http://site.com/image.jpg" />

By including this code in your HTML header you are telling Facebook to use this, and only this, image for your page. This is useful if you want to enforce consistency when folks link to your site by having the same logo or photo associated with your links. However, the side effect here is this will restrict a user from selecting any other image on your page (if there are any available) as the thumbnail for the link.

The second option is to have an image in the body of your page somewhere, either in the content or hidden from view on the page. This allows you to have both a “default” image to use if there isn’t one available on the page, and to allow selecting a more appropriate image from the content if it is available.

If you do not want to show the image you can hide it with:

style="display: none;"

added to your HTML image tag, this will hide the image from view in the browser, but allows Facebook to still see the image and include it for use as a link thumbnail.

Bonus Tip: You can trick Facebook into having two links in one status update by pasting the URL of the first link into your status update, adding a space at the end so Facebook recognizes it as a link and adds the preview, then you can delete that URL, compose the rest of your status update, and paste in a second supplementary URL.

More

Image placeholders for your website mockups

This is a nice way to ease into the week (courtesy of an afternoon article in NetTuts+). Rather than using boring solid-color boxes as placeholders in your website mockups here are two (cute!) alternatives: placekitten (my personal preference) and PlaceDog. For either one you just put your image dimensions (width & height in pixels) after their URL and you’ll get a placeholder image (so something like: http://placekitten.com/200/160)

PlaceKitten Sample

PlaceKitten Sample (200x160)

PlaceDog Sample

PlaceDog Sample (200x160)

Or for a slightly more serious version, you can pull themed images (based on tags) from Flickr with flickholdr.com
FlickHoldr Sample

FlickHoldr Sample (200x160, ocean)

More