About

I'm Mike Pope. I live in the Seattle area. I've been a technical writer and editor for over 30 years. I'm interested in software, language, music, movies, books, motorcycles, travel, and ... well, lots of stuff.

Read more ...

Blog Search


(Supports AND)

Google Ads

Feed

Subscribe to the RSS feed for this blog.

See this post for info on full versus truncated feeds.

Quote

PRAY, v. To ask that the laws of the universe be annulled in behalf of a single petitioner confessedly unworthy.

Ambrose Bierce, the Devil's Dictionary



Navigation





<October 2021>
SMTWTFS
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456

Categories

  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  
  RSS  

Contact Me

Email me

Blog Statistics

Dates
First entry - 6/27/2003
Most recent entry - 9/13/2021

Totals
Posts - 2638
Comments - 2643
Hits - 2,415,907

Averages
Entries/day - 0.39
Comments/entry - 1.00
Hits/day - 361

Updated every 30 minutes. Last: 10:30 PM Pacific


  01:02 AM

Upon attending an SEO presentation this week, I learned that I should be enabling social media a bit better on this blog. So I added a Facebook Like button.

This is my first attempt, so I went with a button that shows up at the bottom of the entry. I was told that it's not bad idea to have a button at the top; a peculiar but attested behavior of users is that they'll sometimes "Like" something before they read it, or possibly without reading beyond the beginning. But let's see how this works out.

Implementing the button is not particularly difficult. The details are laid out on the Like Button page of the Facebook Developers site. In effect, what I did was add the following markup to the bottom of the layout for a blog entry (broken up here for readability):

<iframe src=
"http://www.facebook.com/plugins/like.php?href=%%1%%
&layout=standard
&show_faces=False
&width=450
&action=like
&colorscheme=light
&height=80
&locale=en_US"
scrolling="no"
frameborder="0"
style="border:none; overflow:hidden; width:450px; height:30px;"
allowTransparency="true"></iframe>

I had to add some code to the page to substitute the URL of an individual blog entry (e.g., http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=2272) for %%1%% in the markup. (The blog code is something of a rat's nest anyway, so what's another 4 lines for this?)

You're also supposed to add some meta tags to the <head> element that Facebook uses (they say) to determine what title, URL, and graphic to associate with the content. For example:

<meta property="og:title" content="mike&#039;s web log" />
<meta property="og:type" content="blog" />
<meta property="og:image"
content="http://www.mikepope.com/blog/images/mikesblog_defaultimage.png" />
<meta property="og:site_name" content="mike&#039;s web log" />
One thing that's implicit in the way they implement this, and is noticeable to me already, is that there is a slight delay before the Like button is displayed. Each instance of the Like button has to call the Facebook site and get data about the blog entry that the button is bound to, then return a hunk of markup to display on the page. I display 10 entries per page; that's 10 calls to Facebook. (Only one call, tho, if you're looking at an individual entry.) On the plus side, this is done asynchronously -- not AJAX-y, just via a queued HTTP request, like images. That means that the actual blog content shows up as it always has, it's just the Like button itself that might show up slightly later.

Anyway, we'll see how this goes. If you have some feedback about this, please leave a comment. And, of course, be sure to Like this. :-)

[categories]  

[5] |