I just wanted to test a code highlighter plugin for WordPress, so I’ll use my open source ping.fm Objective-C engine as an example. Yeah, I know, shameless self promotion.

Here’s how to use P8 in your app…

[codesyntax lang=”objc”]

// Yes, you owe a Release later for P8 and
// TestDelegate. This example doesn't do it.
TestDelegate* del = [[TestDelegate alloc] init];
P8Engine* P8 = [[P8Engine alloc] initWithOptions:kP8APIKey appKey:kP8AppKey delegate:del];
if (nil != P8)
{
	// Post something.
	[P8 userPostStatus:@"Testing 1,2,3... Please ignore, http://f67.us/iam"];

	// Create a short URL
	[P8 urlCreate:@"http://rob.crabapples.net/"];

	// Resolve a short URL
	[P8 urlResolve:@"http://ping.fm/xeECl"];
}

[/codesyntax]

Ok, I don’t really like that.