Adding a Custom Sharing Service to Sharedaddy or Jetpack

UPDATED 3/26/11: Since Sharedaddy is now bundled with Jetpack, I’m taking the opportunity to update this slightly and provide some more information. Leave a comment if you have a question!

UPDATED: Hello, self-hosted WordPress users! The plugin has been released for everyone, so I’ve updated the title of this entry to reflect that and these instructions now apply both to WordPress.com and to self-hosted blogs using the Sharedaddy plugin.

Earlier this week, the team here at Automattic released a new feature for WordPress.com that a lot of people have requested for a while now: the ability to add buttons for sharing services to the bottom of every post. (In fact, you’ll see a selection of them underneath this post. Feel free to share away.)

The service comes “pre-packaged” with a handful of buttons for the most commonly used sharing services and methods.

In the announcement post, it’s mentioned that you can add your own sharing services to the selection. If you go further and check out the support page, you’ll see that in order to add a custom sharing option, you’ll need to add certain information. Of course, every sharing service is different, so the same formula won’t work with all of them.

To add your own sharing services, you’ll need to do a little sleuthing and know how the tool works.

(Click on any screenshot in this article to see a larger version.)

Ingredients and Tools

If you go to Settings > Sharing and then click on the link in Available Services to add a new service, you’re prompted to enter three pieces of information:

  • The name of the sharing service
  • The URL needed to “push” a link to the sharing service
  • The URL of a 16×16 icon used to represent the service

All services you add using the custom settings will be “dumb” buttons; you can’t include any fancy JavaScript or buttons with counters. The buttons that are created will look like and follow the same general rules as the “dumb” buttons provided for the pre-loaded services.

Most of this is pretty straightforward. The key to getting it right is the Sharing URL. If you don’t have it right, then the service won’t receive the information it needs when someone clicks the button. You’re given five variables you can pass to the URL:

  • %post_tags%
  • %post_title%
  • %post_full_url%
  • %post_url%
  • %post_excerpt%

The first two will be used much more often than the third. Since the Sharing URL is the tricky part, let’s talk about how to discover it.

Discovering the Sharing URL

For our example, we’re going to use Delicious, since that’s one of the services people are likely to want to use and it’s a nice example of how to determine the right URL and variables to use.

The first thing you want to do is find either a site that already has a button in place for your sharing service, or a tool provided by your sharing service like a bookmarklet or a toolbar button. For instance, when you visit this page on Delicious, you’ll see several methods for getting links into the service. Since I’m using Safari, I’m going to drag the bookmarklet for sharing up into my toolbar.

Once you’ve got the bookmarklet in your toolbar, let’s say you want to save something to Delicious, like this post on Ma.tt with pictures from a recent shindig I happened to attend. (We’ll talk about Lisbon at another time.)

Visit something and then click on the bookmarklet provided. As I mentioned earlier, you can often get the same result by clicking on a button for the service on another site. What you see after you click the link or bookmarklet will look different for each service, but hopefully you’ll see something like this:

So we know what it looks like. Big deal, right? Check the URL, though. It’s this:

http://www.delicious.com/save?url=http%3A%2F%2Fma.tt%2F2010%2F08%2Fhappiness-team-in-lisbon%2F&title=Happiness%20Team%20in%20Lisbon%20—%20Matt%20Mullenweg&v=5&noui=1&jump=doclose

This is exactly what we needed to know in order to set up Delicious as a sharing service. Everything is right there.

Making It Happen

You can discard the “&jump=doclose” part of the URL without any trouble. It’s not necessary for what we’re doing.

So the base URL for sharing something on Delicious is:

http://delicious.com/save

It also takes a couple of arguments, as you can see. Everything after the question mark is a piece of data that’s being passed to the URL to give it the information it needs. There are two chunks here: “url” and “title.” It just so happens that we have the tools we need to fill all that in for our readers.

So since Delicious needs this:

http://delicious.com/save?url=something&title=something

All we need to do is enter this into our Sharing URL field like so:

http://delicious.com/save?url=%post_url%&title=%post_title%

Bingo. So go into Settings > Sharing, and fill in everything. The title is easy; that’s “Delicious.” You know now what to enter for the URL (you can just copy the one above). You’ll also need an image, and it just so happens that I have a perfectly good one from Delicious here.

Save your settings, drag your new service into the Active area, and then save your sharing options. When you go out to your posts, you’ll see:

Clicking on the Delicious link will open up the link addition form, just like the bookmarklet we used above.

Easy? Once you understand how to find the information you need, constructing new Sharing buttons is pretty simple. If you have any questions or comments, please feel free to leave them below.

You can also read my follow-up post, where I’m collecting the specifics needed to configure various sharing services with ShareDaddy.

Advertisements

This Is Partially Because I Still Have Student Loans

Look—I know there aren’t too many people who read this.

I also know that those of you who might be reading either have your own blogs or know people who do, and I also know that most of you are likely using shared blog hosting with either Blogger or WordPress.com (if you are still using LiveJournal, shame on you).

I have been using WordPress for years now, long enough that I’ve seen it begin as a rather humble but impressive project, and grow into something really special. I think the 2.7 release that is coming later this month is a huge leap forward in user interface from the blogger’s perspective—and I think more people should be using it and experiencing the amazing support and extensibility of WordPress for themselves.

The facts above—and a few other things—combined in my head the other day, and so I’d like to make an offer to any other blogger who is reading this post: I would like you to contract me to host your blog and help you with setup and maintenance.

See, despite big increases in the ease of getting going with blogging, in too many cases, it’s still too difficult to get started, to understand how things work, or to manage upgrades to your blog. This is part of the reason that shared blog hosts are so popular – they get things started quickly, they don’t present you with the challenge of keeping things up-to-date, and you usually don’t have to worry about much.

The problem is that shared blog hosts often don’t have the extensibility of self-hosted blogging. There’s a lot more you and I can do with self-hosted WordPress than you can do on Blogspot or even on WordPress.com. There’s tons of plugins and other extensions that can be used to improve the usefulness of your blogging platform and provide services to your readers. I have extensive experience in working with self-hosted WordPress and I think you can take advantage of that fact to offer your readers a richer experience.

So here’s what I’m offering as a service—I will:

  • Install WordPress to a host and prepare it for you.
  • Install any theme from the “official” WordPress theme repository (or from a selection I can provide).
  • Install and help you to configure any plugin from the WordPress plugin repository. There’s lots of these, and they do many and varied things. This includes things like analytics to measure your site stats, content parsers (like RefTagger), and various other things like polls and comment-handling systems.
  • Make sure that your plugins and your WordPress installation are kept up-to-date and help you with any compatibility or other problems that may arise.
  • Offer you some support and knowledge in learning how to use WordPress if you’re new to it.
  • Anything else I can think of to make your blogging easier.

Essentially, I’ll take care of the hosting and all the hidden stuff “behind the scenes,” as it were, and all you should have to worry about is blogging and figuring out where in your theme you want your widgets and things to go. I’ll have awesome suggestions for you and will help you find the right add-ons for what you want to do.

So here’s what I’m asking in return:

  • A $20 setup fee to get things started.
  • $5/month if you have your own domain name (.com, .net, .org, etc.). I will give you the appopriate information to ensure your domain is pointed in the right direction and then make sure it’s set correctly on this end.
  • $7/month if you would like me to handle the domain registration for you.
  • I will help you move any old content at your current blog over to the new one.
  • A slightly higher, negotiable fee per month if you would like to do something more intensive, like podcasting. I can offer good expertise in doing such a thing and finding appropriate hosting/bandwidth for the audio files themselves. (This will also increase your setup fee.)
  • Custom theme development will be available on a limited basis and for a competitive fee (payable on theme delivery) to be determined if anyone actually asks me to do so (probably $100+).

As a side note, WordPress can actually make for some pretty impressive—yet simple—church web sites that you will be able to update yourself with a little coaching. Ask me about that if you’re interested.

If you want to know more, all I ask is that you email me at ryan@themarkelfamily.com and let me know. I will make sure I get back to you if you have any questions or want to know more about this idea.

There are two prerequisites that have to be covered first:

  • I won’t start the hosting until after the release of WordPress 2.7. Seriously; it’s that awesome.
  • I can’t start the hosting until I have a handful of people (read: more than one) who are interested in the service. It takes a certain number of people in the queue before I can afford the appropriate hosting and get people started.

Oh, and please note that this offer is made as a personal offer of assistance and basically “contract work.” This is in no way related to my day job, and I can’t respond to support requests during hours I’m normally at work. I want to make that clear.

I’m very interested in providing this service for people who might be looking to jump ship from one of the shared hosts available and move to something self-hosted and more powerful. I hope you will take me up on the offer. If you don’t want it, then please mention something on your own blog or to people you know regarding this offer to see if they are in turn interested (especially you Lutheran bloggers).

Once again, just email me at ryan@themarkelfamily.com if you want to know more.