So many of the “pet projects” we work on never see the light of day. Often times its not that what we have holds no value, rather its that the creator in us just can’t see it as mature enough to be ready for the world. So we set it aside, the pet, and let it slowly starve as it inches its way to the graveyard abyss which we know as the back-up harddrive that eventually gets stashed away never to be seen again. This has been the fate of many of my pets (projects) over the years. Today, I’m going to prove that people can change by releasing one of these pets. I call this little guy the Pownce Badge Creator.
Its a simple little badge maker that lets you customize the colors and make a pownce flash badge for your website (or whatever). It displays links when available and also thumbnails to flickr pictures.
So I had high hopes for bringing the different media types into this little guy but may never get to it. That doesn’t mean that he still isn’t cute and useful. Enjoy.
It lives! -s
Side Note: Pownce is much faster these days. Muuuchhh faster. One my other new goals outside of pet saving is to post there more and try out that pownce iphone app. You can follow me there at http://pownce.com/initapp
Now that Pownce has released an official API covering features such as posting files, I decided to go ahead and make an AS3 library for it. I just posted it to googlecode and have only done minimal testing on it. I would appreciate any feedback.
The Pownce team did a terrific job with the API. Easy to use and consistent. I had minimal issues while creating the as3 library.
In my opinion (yeah you can skip this) Pownce is a far better user experience than Twitter. Its like a gobot and a transformer or a dell laptop and a macbook or chocolate torte and hohos. That is the best I an come up with that the moment, yes.
I could be missing something here… but this API in my mind is a leap forward in the race with twitter.
Existing issue:
One method is not currently working. It is the retrieval of the send to list. I’ve posted information about the issue to the google pownce group and hopefully it will be resolved soon.
So this morning Pownce finally released a true API that allows us to use the full functionality of Pownce. A while back I posted information on how to do this in a reverse engineered method, but now we can do it without the feeling that we might be doing something bad (although that can be fun sometimes to can’t it).
The code sample below shows how to Authenticate to the service using HTTP Basic Authentication and posts a note/link.
Steps to take
1. Get a pownce account if you don’t have one.
2. Register to get an application key.
3. Use the following code. Change “app_key” to your application key. Change “login” and “password” to user you want to post with.
import mx.utils.Base64Encoder;
private const APP_KEY:String = "<app_key>";
publicfunction initApp():void{
sendNote("Example of note in the new API.",
"http://pownce.com/initapp",
"<login>",
"<password>");
}publicfunction sendNote(note:String, link:String, login:String, password:String):void{var urlLoader:URLLoader = new URLLoader();
var urlRequest:URLRequest = new URLRequest();
var urlVariables:URLVariables = new URLVariables();
var authHeader:URLRequestHeader = new URLRequestHeader("Authorization", "Basic " + base64Encode(login + ":" + password));
urlVariables.note_to = "public";
urlVariables.url = link;
urlVariables.note_body = note;
urlRequest.requestHeaders.push(authHeader);
urlRequest.url = "http://api.pownce.com/2.0/send/link.xml?&app_key=" + APP_KEY;
urlRequest.data = urlVariables;
urlRequest.method = URLRequestMethod.POST;
urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHTTPStatus);
urlLoader.addEventListener(Event.COMPLETE, onComplete);
urlLoader.load(urlRequest);
}privatefunction onHTTPStatus(event:HTTPStatusEvent):void{trace(event);
}privatefunction onComplete(event:Event):void{trace(event);
}privatestaticfunction base64Encode(data:String) : String{var encoder:Base64Encoder = new Base64Encoder();
var bytes:ByteArray = new ByteArray();
bytes.writeUTFBytes(data);
encoder.encodeBytes(bytes);
return encoder.flush();
}
If you want to hear more of my occasionally relevant information then add me to your friends in pownce: http://pownce.com/InitApp/
Note: I did this example using Flex and used mx.utils.Base64Encoder. If you’re not using Flex you’ll need to use an alternate package for your Base64 encoding.