Share extension for BlogEngine.NET

by Juan 28. March 2009 12:37
Share on Facebook

Share is a new extension for BlogEngine.NET. What it does is pretty simple, it adds a “Share on Facebook” link on top of every post, so you can share them on facebook as a link.

After you install this extension (instructions below), you will see the link as follows

image 

The extension uses a custom page for its configuration, where you can select the text of the link, and the link type, as explained on facebook’s help page.

image

And, as advertised, when you click the share link, you get the pop up window to post the link to your facebook profile

image

Optionally, you can add a link to the head section of the site.master of your theme, to have facebook pull that image as a thumbnail, you do that like this

<link rel="image_src" href="<your_url>" />

Where <your_url>, is the url of the image you want to display.  

To install this extension, simple unzip the following files on your BlogEngine.Web root directory

Important Note: This code is an extension for BlogEngine.net version 1.4.5.15 and up. It was tested on this version, because it has a bug fix that made extensions don't work. The bug is present in 1.4.5, I don't really know exactly in which subversion it was fixed, you can check it yourself.

The problem was in the method DataStoreExtension in App_Code\ExtensionManager\Manager.cs, the line

Stream stm = (FileStream)xs.GetSettings();

has to be

Stream stm = (FileStream)o;

That's it! You can download the files below, and you can try it on this very post, just click "Share on Facebook" there on the top

Tags: , ,

Blogging | Programming

Powered by BlogEngine.NET 1.4.5.15
Theme by Mads Kristensen Modified by Juan Manuel Formoso

About the Author

Juan Manuel
Networking
View my LinkedIn profile View my Facebook profile View my Twitter feed View my StackOverflow CV

Juan Manuel Formoso
There is a theory which states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something more bizarrely inexplicable.

There is another theory which states that this has already happened.

E-mail me Send mail

Hosting is not Free

Google Reader Picks

Most comments

Cristian Cristian
1 comments
co Colombia

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

Recent comments

Comment RSS

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in  anyway.

© Copyright 2008