Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I am sending an email campaign out to subscribers and I would like to incorporate a Facebook Like and a Tweet Button into my email. Since I cannot use javascript inside emails I was wondering the best way to do this. Here is what I have so far:

Tweet Button

<a title="Share Via Twitter" href="http://twitter.com/intent/tweet?
url=http://my-campaign-url&amp;text=My%20Text%20-%20&amp;via=My Name&amp;">
<img src="/Images/network_icons/tweet-button-small.png" 
style="border:0 none;" alt="Share Via Twitter">

Facebook Like

<a title="Like this on Facebook" href="http://www.facebook.com/plugins/like.
php?href=http://my-campaign-url.com&amp;layout=standard&amp;show_faces=
false&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=427%20">
<img src="/Images/network_icons/fblike-button-small.png" style="border: 
0 none;" alt="Like This on Facebook">

Here are a few questions:

How do I pull the subject of the email to be posted along with the content?

Is it possible to pull only an image from the email and have that posted vs the entire email content?

Is there a better way to code the above buttons?

Thanks for the assistance.

share|improve this question
    
What software you using to send the emails? –  Nick Sep 1 '11 at 10:58
    
I use a CMS to handle the mailing. I build the code in HTML then paste it into their Editor and off it goes –  Lynda Sep 2 '11 at 0:49

1 Answer 1

up vote 1 down vote accepted

AFAIK, the Facebook Like buttons are for web pages only. On e-mails you can create share links (and use images as buttons).

The code would be:

FACEBOOK:

<a href="http://www.facebook.com/sharer.php?u=http%3A//my.campaign.url"><img src="http://absolute.path.to/fblike-button-small.png" style="border: 
0 none;" alt="Like This on Facebook"></a>

Facebook sums "shares" to Likes count.

TWITTER:

<a href="http://twitter.com/?status=My%20tweet%20http%3A//www.mysite.com"><img src="http://absolute.path.to/tweet-button-small.png" style="border: 
0 none;" alt="Tweet this"></a>

NOTE:

Your website URL and the Twitter message have to be URL encoded for both Facebook and Twitter links. There are tools to help with URL encoding. Click this link to search them in Google:

http://www.google.com/search?q=urlencode+tool

share|improve this answer
    
Thanks, I found this last night: addthis.com/get-addthis and this does what you say but a bit easier as a tool => –  Lynda Sep 2 '11 at 1:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.