Daily Archives: June 16, 2011
Using Custom Share Button for LinkedIn
Posted by Mike

Custom Image for a LinkedIn Button
LEVEL: BASIC
We often want to use a button that matches our website design, or fits into an available space. A common example is a row of small square buttons, instead of the standard rectangular official ones.
I found a bit of useful code to allow the use of our own image file for the LinkedIn share button. Copy and paste this code and place in webpage where you want the button to appear.
<a href=”http://www.linkedin.com/shareArticle?mini=true&url=http://your page url&title=Your Page Title&summary=Your page content description&source=My Website Name” target=”_new”> <img src=”URL TO THE IMAGE” alt=”linkedin share button” width=”20″ height=”20″ title=”Share on Linked In” /> </a>
This opens a page in a new window or tab (If you want to use a pop-up window, you will need a bit of extra code) with a box that looks like this:

Guidelines to customise this button code, and some free button images can be found at http://www.graphicline.co.za/webmaster_tech/codesnippets/custom_linedin_button.htm
It can also be tested from that page.
Linked in Button for HTML
This Linked In button code is intended for HTML webpages. The code described is manually inserted in the page. If you want to to use an active method of inserting page URL and Title, you will need to use the Linked In Java API or REST API, with JQuery or similar code.
NOTE: Using the API requires anyone sharing the page to allow the API to access their profile – not a perfect solution – the API is under active development so this may change soon…
Custom Image Buttons for Other Social Shares:
More code snippets for Twitter, Facebook, Stumble Upon, Reddit, Delicious, and Digg can be found from the menu on this page: Technical Things (Graphicline.co.za). Several of the code snippets have been updated recently to use a pop-up share box instead of a new page or tab and better integration for Open Graph meta data.
A link to a short article dealing with Open Graph data is also available.
Related Articles by the same author:
- Open Graph and Custom Linked In Share Buttons (Graphicline Blog)