MySpace API - Automate your Blog posts

I have written a small API which allows you to add blog posts with a simple URL GET.
Update: It seems that sometime recently the MySpace pages for posting to your blog have changed, and so this API is now broken. I will fix it shortly when I have the time.

The format for usage is:


http://myspaceapi.com.99.seekdotnet.com/BlogPost.aspx?Subject=[Post Subject]&Body=[Post Body]&Email=[Your Myspace Email]&Password=[Your Myspace Password] 

Eg:
http://myspaceapi.com.99.seekdotnet.com/BlogPost.aspx?Subject=This+is+a+test+of+the+API&Body=test+body&Email=info@google.com&Password=googlepw

Remember to HTML encode the [Post Subject] and [Post Body]

To try it out:

The code for this simple test page is:


<script type="text/javascript">
function SubmitBlog()
{
var sSubject = escape(document.getElementById('iSubject').value);
var sBody = escape(document.getElementById('iBody').value);
var sEmail = document.getElementById('iEmail').value;
var sPW = document.getElementById('iPassword').value;
window.location = "http://myspaceapi.com.99.seekdotnet.com/BlogPost.aspx?Subject=" + sSubject + "&Body=" + sBody + "&Email=" + sEmail + "&Password=" + sPW;
}
</script> 

<table>
<tr><td>Post Subject</td><td><input type="text" id='iSubject'></td></tr>
<tr><td colspan=2>Post Body</td></tr>
<tr><td colspan=2><textarea id='iBody' rows=5 cols=31 width=100%></textarea></td></tr>
<tr><td>MySpace Email</td><td><input type="text" id='iEmail'></td></tr>
<tr><td>Myspace Password</td><td><input type="text" id='iPassword'></td></tr>
<tr><td></td><td><input type=button value="Submit" onClick="SubmitBlog()"></td></tr>
</table>

No logs of requests are kept (I have no interest in stealing your password and becoming the most hated man on the internet). All the source code is in ASP.Net. If you would like a copy, send me an email.

At the moment, because all requests are handled via GET, the body posts must be reasonably small. If there is interest I will expand the API to allow POSTs so that the blog body can be larger.

Fast Friday

Friday already, and what have I achieved?

Sudoku.com.au Fixed up a few bugs and added the membership expiry date for members. All the interesting stuff was to do with managing ‘people issues’. Big changes to the site coming up next week, though.

I Want That Flight! lots of updates within the code to make it faster and more reliable. Still plenty of room for improvement.

Hidden Bars of Melbourne - The photos are up, so check out what we got up to last night! This was one of the biggest nights out in a while - we didn’t call it quits till 2:30am, thats how dedicated we are :).

I was surprised to see that Mitch Harper closed down his blog after only a month. Within that time he made it into the Top 10 Australian blogs, as well as spending a bunch of cash. His blog posts were all very long, detailed and of a high quality, and I wondered how he had the time for it and running his company. Well, I guess now we know.

There is a Havana themed party at Manchuria this weekend, so I’ll definitely be going to that. I’ll be the one with the big cigar!

How to find reciprocal links

Reciprocal links have gone out of style for most SEOs, but I still get good rankings from recip links - and they are much easier to get than one-way links.

This method also helps you find relevant links. Relevant links help 2 ways

  • They are judged as more valuable by Search Engines versus an otherwise equal link on a non-relevant site.
  • If a person browsing the site, they might actually click on a relevant link.

The easiest way to find relevant links, is to choose a competitor and find out who links to them. Chances are, they will also be happy to link to you. This is a major feature of programs like ARELIS (I know, cause I own it) but if you have more time than money, you can do it on the cheap.

Yahoo has the great ‘linkdomain’ command, but the results can be a bit of a pain to sift through. This one is much better:
http://johannesmueller.com/tools/yse/

OK, so now you have a list of potential link partners. Now you have to contact these people - tedious but important.

For every reciprocal link that you want to chase, visit the website & see if they are actually likely to link to you. If they have an area for links, or better yet an information page which your link would fit into then they are worth getting in touch with.

Go to the ‘About’ page of the site and find the name of the person behind it as well as their contact email. You will get much better results if you personalise the ‘link beg’ as much as possible.

Now that you are sure you are going to write to the person, add their link to your site. Don’t wait for them to put their link to you up, why should they make the first move?

Writing the Link Beg email
Address it to the site owner personally and comment on something that stands out on their site (eg a picture) to show that you have visited it. Mention that you think their site is useful to your visitors and you have put a link up already (give them the URL) and say that their visitors might find your site useful as well. Finally, always give the complete HTML for the reciprocal link that you want. This makes it easy for the webmaster to cut-and-paste the code right into their site, and allows you to get the anchor text that you want.

If you are concerned about leaving one-way links on your site to other sites that don’t respond, then keep track of your emails in a spreadsheet. Allow a few weeks for all the responses to come through.

Feedburner Hack: Check out the rss subscriber numbers on any site

You know the little chicklets that some blogs have that show how many subscribers they have? Some people don’t display their subscriber numbers - wouldn’t you like to know how many they had?

Here is BoingBoings for some inspiration:

It turns out it is very easy to get anyones Feedburner subscriber numbers, as long as they have the tracking turned on.

First, get the Feedburner ID of the site you want to check out.

The Feedburner ID of a site is the last part of their Feedburner RSS URL. Eg:
http://feeds.feedburner.com/ShoeMoney

Now get the chicklet code, and where you see your own Feedburner ID, just insert the ID of the website you want to check out.


<img src=”http://feeds.feedburner.com/~fc/ShoeMoney” />

Gets you:

It’s not quite BoingBoing - but it kicks my ass! :)

How to look like you are working at work

I was going through my referrer logs the other day, when I noticed this:

http://www.workfriendly.net/browse/Office2003Blue/http/gathadams.com/

Which makes my site look like this:

Pretty cool, eh?

The site even has a ‘Boss Button’ which you can click which makes the page look exactly like a Word document. Of course, I still think the best way to appear busy at work is the classic ‘always look mad’ from Seinfeld :)

Build your own Social Bookmark widget

It’s important to make it as easy as possible for your visitors to bookmark your site - both so they can find it again, and also so they can share it with their friends. I have a bunch of sites, and I wanted to create a simple way to add bookmarking to all of them.

Basically, the bookmark links provided by the social networks accept 2 parameters:

  • The URL of the site/post
  • The title of the page

It is easy enough to get both those values using javascript:

var TheTitle = encodeURIComponent(document.title);
var TheURL = encodeURIComponent(document.location);

It is important to encode the values, so that they can safely be placed in a bookmark URL.

You then just need the code to output the bookmark link. Here it is for Google Bookmarks

document.write(’<a href=”http://www.google.com/bookmarks/mark?op=add&bkmk=’ + TheURL + ‘&title=’ + TheTitle + ‘” title=”Bookmark to Google”><img src=”http://img2.imagepile.net/images/ycc2106/35814433.png” alt=”Google” height=”16″ width=”16″ border=”0″ /> Google</a>’);

Add a few other Networks (BlinkList, Furl, Delicious) and the full code is:


var TheTitle = encodeURIComponent(document.title);
var TheURL = encodeURIComponent(document.location);
document.write("<style>a.sbm{padding-left:7px}</style>");
document.write("<div>Bookmark with:");
document.write('<a class="sbm" href="http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url='+TheURL+'&Title='+TheTitle+'")title="Add To BlinkList"><img src="http://img2.imagepile.net/images/ycc2106/89442389.png" alt="BlinkList"  height="16" width="16" border="0" /> BlinkList</a>');
document.write('<a class="sbm" href="http://www.furl.net/storeIt.jsp?u='+TheURL+'&t='+TheTitle+'" title="Bookmark To Furl"><img src=http://www.furl.net/i/favicon.gif alt="Furl button"  height="16" width="16" border="0" /> Furl</a>');
document.write('<a class="sbm" href="http://www.google.com/bookmarks/mark?op=add&bkmk='+TheURL+'&title='+TheTitle+'" title="Bookmark to Google"><img src="http://img2.imagepile.net/images/ycc2106/35814433.png" alt="Google"  height="16" width="16" border="0" /> Google</a>');
document.write('<a class="sbm" href="http://del.icio.us/post?url='+TheURL+'&title='+TheTitle+'" title="See who bookmarked at del.icio.us" ><img src="http://img2.imagepile.net/images/ycc2106/65682475.png" alt="del.icio.us"  height="16" width="16" border="0" /> Del.icio.us</a>');
document.write("</div>");

Or you can Download it here

To use it on your site or blog, just add the code:

<script src=”socialwidget.js” type=”text/javascript”></script>

The final effect is exactly what you see at the bottom of this blog post.

If you want to add more Social Networks, just find out their particular submission format and add them right in. I chose these four because they were recommended on a recent episode of Rush hour (doesn’t everyone listen to this?) which talked about which were the important social network sites for bookmarking.

Quick Friday

A few sites have gotten some attention today:

Sudoku.com.au
You can now have your own Sudoku on your site, and blend it in with the colour scheme of your site.

Hidden Bars of Melbourne
Last nights photos are up, so you can see what we got up to.

FreeCrosswordPuzzles.com.au
American style crosswords are almost ready. Definitely next week!

Now I’m off to a bunch of Comedy - Justin Kennedy tonight and Dave Hughes, Danny Bhoy and Adam Hills next week. The comedy festival rocks!

How to outsource successfully

Dave and Jay made an interesting post on a tool they are using to help with content creation and it got me thinking on my own efforts at outsourcing content/software creation. I’ve outsourced several projects - both successfully and unsuccessfully, as well as helped friends with preparing their projects for outsourcing (which have been successful, thankfully). So here is what I’ve learned:

Be as detailed as possible with your instructions
Every time a contractor comes to a point where there is no specification is a chance for a major problem. At best, they will stop what they are doing and work on something else and you just lose a bit of time. At worst, they will make a (hopefully) educated guess as to what you wanted and continue on - and the guess is wrong. Depending on when this is discovered it can mean the project is delayed, or it can completely sink it. Try to show a friend the specification and see if it covers everything. Based on documents I have written and read, bring the friend plenty of coffee.

Functional, not Technical
Write what you want the program to be able to do from a users perspective, not how it will actually do it. Unless you specifically want the program written a certain way it is enough to write ‘Store the address in a database’ rather than ‘Store First Name, Last Name, Phone Number in the Client table using the SQL statement INSERT …’.

If there is a user interface, draw it
Drawing the user interface forces you to think about how the user should accomplish tasks. Once you have drawn a screen, run through the functions for that screen, and check that the buttons and fields are all there to make them possible. Having everything visible allows you to easily spot errors of the kind ‘There is no way to delete/add XYZ’ or ‘There is no link between child and parent items’.

If there is a database, list all the fields
Chances are if you are asking users to enter information that you want stored, then you are going to need a database. Simply go through all the screens and write down the fields that you want saved. It is another chance to run through the fields and make sure you have everything (and for the contractor as well). If you are comfortable with it, it is also very helpful to indicate the data type of each field (eg - Number, Text, Image etc).

If the program is similar to another on the market, mention the other program
After you have fully described a screen or action, it is often handy to point to an already existing implementation. Instructions like ‘The screen should have the same search fields as ticketmaster.com’ or ‘the functionality should be the same as Google Suggest’. If the contractor can already see an example of what you are trying to achieve, then it makes it a lot easier for them.

If possible, choose someone who has already programmed what you want
Not always possible, but great when it is. An example is that I needed a stand-alone sudoku program written to offer my members. I put in the job spec that I would be more likely to choose a person that had already built one. In the 20 or so replies that I got, several proposals showed demos, and I chose one. It was a simple matter to get the programmer to customise it for me, and the project was completed quickly and successfully.

Choose someone who speaks your language fluently
As hard as you try, on any decent-sized project you will run into areas that you haven’t specified or other issues with your contractor. In the cases where you have to have in-depth discussions with your contractor it is going to help if you can talk freely and understand each other easily. Also, if there are language difficulties it is much more likely that the contractor will try and second-guess you rather than go to you for clarification on some point.

Get a walkthrough before final delivery
If your project is going to last longer than a week, then I highly recommend getting the contractor to demo the progress at some point (preferably half way). If you spot any problems they are going to be much easier to fix at this point than on the delivery day. Also, if you have set milestones for completion it is a great way to keep the project on time.

Thats all the major tips I can think of! The effort that you want to put into each of these areas depends on the size of the project; the larger the project is, the more management (both before and during) it is going to require.

Obfuscate your email address to prevent spam

Obfuscate is one of those words you don’t get to use in conversation much isn’t it? Unless you work at the NSA maybe, and they probably have an even more technical term.

Basically, it means “to deliberately make something unclear or difficult to understand” which actually comes in handy when you want to prevent people scraping your site to get your email address.

To try it, just enter the HTML that you want encoded into the top box. Eg:

<a href='mailto:gath@hishouse.com'>Contact Me</a>

Press the ‘Encrypt’ button and then you are given the obfuscated version. Just copy & paste the javascript into your HTML page.



Of course, you hide all kinds of things from prying eyes (automated or not). This kind of encoding can be defeated by a commited hacker (esp. the extremely simple encoding used here) but is usually enough to make the hacker look elsewhere. Using just the method above has managed to keep 95% of my sites spam free.

Right, now I’m off to play Desktop Tower Defence

Spreading the Link Love

Alex over at Blog about Money Online gave me a shout out yesterday on my Batch Image Processor and I would like to say a big ‘Thank you’ and return the favour. He talks about all kinds of techniques for making money through blogging, and is well worth checking out.

While I was over there, I had a read of his post on Anchor text and its importance for SEO. One of the things he talks about is getting other webmasters/bloggers to use the anchor text that you want - its hard unless you say something like ‘link to me using the words blah-blah-blah’ which is pretty forced. The easiest way is to make sure that the words you want to rank for are in your domain name. I’d say Alex wants to rank for ‘blog about money online’ or perhaps just ‘blog money online’ :)

I use the same technique as well, so I end up having sites called sudoku.com.au, freecrosswordpuzzles.com.au. Clearly, I had no idea when I started IWantThatFlight.com.au….