How to Tweet your Knol Updates

A tutorial

Wouldn't it be super, if after you update a knol article, you could tweet your followers about it? Well now you can.

Authors

Written 2010 by Will Johnson for Fast Forward Technologies
Email Fast Forward Technologies at fft2001@aol.com
or post your comments for public view far below.
Creative Commons Attribution 3.0 License
fft2001
The Knol Self-Tweeter on the left, is designed to work only for an article's author.

Follow Fast Forward Technologies on Twitter!
or use my Knol Public activity feed

Buy your own Knol Self-Tweeter for only two dollars! I will email it to you, when I receive payment.
What the Knol Self-Tweeter does is explained in this article you are reading!

Since Twitter has taken at least part of the world by storm, Knolians want to know, "How can I tweet my followers that I've updated a Knol?"  We're going to take it tiny step by tiny step and see if we can figure it out.  Sort of like building the Taj Mahal by throwing mud randomly in a circle.  Okay maybe not.

First, this article is going to use PHP.  You are not going to need to learn PHP, but you are going to need to ensure that you have a website which supports your use of PHP.  Typically if you pay for some website like http://www.penguins.com or whatever you've called it, you probably do have access to use PHP through that site.  I don't however know of any free sites that allow the use of PHP, if you do, email me!  You can also get access to a local version of PHP by running your own web server like Apache on your own computer.  Just in case you're so inclined.  Apache and PHP are free, but it does take a bit of work to learn how to use them.

Before you keep reading here, why don't you take my short tutorial on PHP, but stop at "Lesson 3 Forms" and return here, then keep reading this article.  The reason is, that we going to create a URL which mimics the result of the GET method in a form, and you should understand what that means.

Now that you see that, provided we write a PHP script that assumes the GET method, we can build our own custom URL's and simply point at them, without the need for a form at all.  We don't want to use forms because Knol does not support raw HTML forms.  Although I'm unsure if they would support this sort of coding using Google Docs or not.  Haven't yet tried it.


First, we need an image of a button.  Here's a png image from Twitter, but I'm not sure if Knol will display pngs or not...  Ok it does !

Next we want to determine if Knol supports the idea of clicking an image and having some action occur.  So let's try the standard HTML way of doing that.  Click on the below button and you should be taken to http://knol.google.com if this works at all !

Okay, that's a relief it did work!  Here's the code
<a href="http://knol.google.com"><img src="http://s.twimg.com/a/1265999168/images/default_profile_1_normal.png"></a>

By the way, you just got a freebie!  I taught you how to create a clickable action image.  You can use any image you want and build the HTML just as above, and use whatever eventual URL you want to use, directly in your Knols.  Now you owe me a ham sandwich!

Anyway, back in the trenches.

What we really want to do here is build a URL that directs us to our own custom PHP script, while passing the name of this article to it!  Say that five times fast.

So... uh... something like

http://www.penguins.com/twitmyknol.php?Prefix=I_just_updated_my_article&Title=How_to_Tweet_your_Knol_Updates

Let's pretend that means something already.  What we want, is to send to Twitter something like this:
"I just updated my article How to Tweet your Knol Updates"

But don't we also want to include the URL ?  How do we do that?  And do we really need to embed the Title into the URL or can that be found by the PHP program?


--> Continue to How to Tweet your Knol Updates (Page 2)