--> del.icio.us - Automatic Blog Post - Impersonation Failure

del.icio.us - Automatic Blog Post

[Update: I've updated this post with tag support here]

http://del.icio.us has a very useful feature, the daily blog posting, which creates a daily blog post with all the links you tagged during the previous 24 hours. So instead of trying to memorise links and then post when you get a chance, whenever you come across something useful just tag it with del.icio.us as you would normally and at the end of the day or at a time you specify del.icio.us will generate a summarised post for you.

You set this us via the del.icio.us settings page -> del.icio.us -> settings -> daily blog posting.

One snag though, del.icio.us isn't very clear about which blogging API's they support. The interface where you configure the daily blog post is pretty geeky. Under out_url it mentions XML-RPC interface but that is a pretty broad definition. There's several blogging API's out there all XML-RPC based: MetaweblogAPI, Blogger etc. They also don't allow you to test it, you get one shot at configuring it and if it doesn't work the best you can do is configure the job for an hour later and hope for the best.

So after the initial attempt at using the default Metablog.ashx endpoint in Community Server failed I setup a simple HttpHandler last night to just dump out whatever was posted by del.icio.us. It turned out they are using the MetawebblogAPI but for the publish parameter there's a type mismatch with del.icio.us is posting an Int parameter where the CS Metablog were expecting boolean parameter.

So as a quick fix to enable a del.icio.us compatible endpoint I created a new HttpHandler, del.icio.us.ashx, under blogs which just generalised the last parameter to object to allow del.icio.us to successfully create posts here.

Below is the couple of lines of code for my del.icio.us.ashx HttpHandler which just delegates back to the original one. (To use just create a file called del.icio.us.ashx under your blogs folder and add the code below as the content) A cleaner approach if you're using the SDK would be to update and recompile CommunityServer.Blogs but this is a nice & quick no-recompile required addition to enable the del.icio.us daily blog post functionality.

For blogs on dotnet.org.za the url to use for del.icio.is http://dotnet.org.za/blogs/del.icio.us.ashx

Note. This was done after a couple of beers at our year-end lunch and it seems to work but use at own risk.

It also doesn't handle categorising/tagging posts yet. I suspect it's using a non-metablogapi method for setting those but will have to confirm.

<%@ WebHandler Language="C#" Debug="true" Class="CommunityServer.Blogs.Components.Delicious" %>
using System;
using System.Collections;
using System.Configuration;
using System.IO;
using System.Text.RegularExpressions;
using System.Web;
using CommunityServer;
using CommunityServer.Blogs.Components;
using CommunityServer.Components;
using CookComputing.XmlRpc;
 
namespace CommunityServer.Blogs.Components
{   
 
    public interface IDelicious
    {
        [XmlRpcMethod("metaWeblog.newPost",
             Description="Makes a new post to a designated blog using the "
             + "MetaWeblog API. Returns postid as a string.")]
        string newPost(
            string blogid,
            string username,
            string password,
            MetaWeblog.Post post,
            object publish);
 
    }
 
    /// <summary>
    /// Generalized metablog.newPost endpoint for del.icio.us
    /// </summary>
    public class Delicious : XmlRpcService, IDelicious
    {       
        public string newPost(
            string blogid,
            string username,
            string password,
            MetaWeblog.Post post,
            object publish)
        {
            IMetaWeblog metablog = new MetaWeblog();
            bool p = Convert.ToBoolean(publish);
            return metablog.newPost(blogid, username, password, post, p);
        }        
     
    }
}
 

Comments

# Impersonation Failure said:

I've updated the HttpHandler for Community Server del.icio.us daily blog post support I posted yesterday

Saturday, November 25, 2006 12:50 PM
# Community Server Daily News said:

news of the day a grab bag for what's happening in Community Server Tim Laughlin will be migrating an

Monday, November 27, 2006 10:57 PM
# Daily News List Blog said:

Armand du Plessis adds more "deliciousness" to his cadre of recent MetaBlog API efforts. Del.icio.us

Monday, November 27, 2006 11:12 PM
# Prog said:

news of the day a grab bag for what's happening in Community Server Tim Laughlin will be migrating an

Monday, November 27, 2006 11:28 PM
# Community Server Bits said:

Armand du Plessis adds more "deliciousness" to his cadre of recent MetaBlog API efforts. Del.icio.us

Monday, March 12, 2007 12:05 PM
# Tim Laughlin Delicious said:

ASP.NET Ajax and Community Server: JavaScript Comment Stripper Task not found - Dave Burke (tags: CommunityServer

Saturday, June 02, 2007 3:25 PM
# Tim Laughlin Delicious said:

ASP.NET Ajax and Community Server: JavaScript Comment Stripper Task not found - Dave Burke (tags: CommunityServer

Saturday, June 02, 2007 3:25 PM
# Tim Laughlin Delicious said:

del.icio.us - Automatic Blog Post - Impersonation Failure (tags: CommunityServer del.icio.us ) Thou Shall

Sunday, June 03, 2007 7:35 AM
# Tim Laughlin Delicious said:

del.icio.us - Automatic Blog Post - Impersonation Failure (tags: CommunityServer del.icio.us ) Thou Shall

Sunday, June 03, 2007 7:35 AM
# DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

Monday, August 20, 2007 9:02 PM
# Just Auto’s here! » Blog Archive » Adding del.icio.us Automatic Blog Post Support to Community Server. said:

Pingback from  Just Auto&#8217;s here!  &raquo; Blog Archive   &raquo; Adding del.icio.us Automatic Blog Post Support to Community Server.

Monday, January 28, 2008 1:53 PM
# automate blog posting said:

Pingback from  automate blog posting

Tuesday, April 15, 2008 4:40 AM
# Ultracet vs vicodin. said:

Drug ultracet. Ultracet. Is ultracet a narcotic.

Friday, June 20, 2008 6:23 AM
# Lipitor versus pravachol. said:

Lipitor and its bad effects. Lipitor and muscle pain. Generic lipitor side effects.

Monday, July 07, 2008 9:20 AM
# Avandia. said:

Avandia actions. Avandia side effects. Avandia.

Friday, August 01, 2008 2:56 AM