Graphic Design Forum with a large community of graphic designers and web designers having lengthy design and graphics discussions
It is currently Sat Nov 21, 2009 10:14 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
 Add support for Facebook links 
Author Message
I bleed CSS and HTML
User avatar

Joined: Sun Sep 18, 2005 7:29 pm
Posts: 4522
Location: Salt Lake City, Ut
Post Add support for Facebook links
With the web being more social driven, it is being more important to support little features that these social media sites offer.

One that is used often is the Facebook Link capability. The basics of it is, is that if someone links to a site, facebook will grab the site title, description, and an image from the site it is linking to.

The site title and description are easy enough to control, but what about the image that it thumbnails. In order to control it, you must understand how it works. Don't worry, its really easy to understand. All it does is look for <img> tags and makes every one into possible thumbnails. It will not pick up on background images.

Now depending on your layout, chances are that you site is not picking up on a suitable image. Lets change that. We are going to use a little trick that fools facebook into using the correct image, but not being obstrusive to your normal users. Its as easy as some simple CSS you probably already know.

Luck for us, facebook can not read CSS, so we will use that to our advantage.

Create a small image of your company logo or anything you want Facebook to display as the thumb.

Before any content in your site (especially images). Add this:

Code:
<img src="facebook_thumb.jpg" alt="Company Name" style="display:none;" />


The display:none; will prevent your normal users from seeing the image, but since facebook can't read the CSS, it will display it as the first choice for a thumbnail if someone links to your site from Facebook.

Have Fun.

_________________
Image

Image


Sat Nov 07, 2009 4:28 pm
Profile
User avatar

Joined: Thu Mar 27, 2003 6:23 pm
Posts: 4059
Post Re: Add support for Facebook links
Thanks Cib.

_________________
ADMIN http://artistshelpingchildren.org/
http://AllFreelance.com/
http://Webdesigntoolslist.com/
http://drawinghowtodraw.com/stepbystepdrawinglessons/
http://gadgets-technology.com/


Sat Nov 07, 2009 5:47 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.