Skip to main content
 

How chickens work #indiewebcamp

I built an easy way to post chickens.

To post a chicken, or series of chickens, the user just clicks on the appropriate content icon:

51c72621bed7de1c5e787b6c

Note that the content icons are designed to be accessible both on a touch device and with a pointer.

The user is then asked exactly how many chickens they would like to post (with clear messaging: "CHICKEN CHICKEN CHICKEN?").

Once the user has made their chicken selection, a new chicken object is created. An Activity Streams "post" event is called. I've written my chicken plugin to define chicken content as having an Activity Streams object type of "note".

Twitter and Facebook plugins are listening for new "post" events with object type "note". When I post chickens, they're sent one! If I've linked idno with my Twitter and Facebook accounts, the content is sent to those plugins, and they are in turn responsible for sending the content to their respective sites.

My chickens are posted to Twitter and Facebook.

Finally, the default template on my feed defers to my chicken plugin every time someone visits on my site and wants to see my chicken content. (The template there displays chickens with some photographic help.) I've added an h-as-chicken microformat content type behind the scenes, so third-party clients can parse my pages for chicken content. And finally, the Activity Streams content is available to anyone who requests my pages with an Accept: application/json header.

It took 30-45 minutes to code, except for chicken photo search and download time. And here's what a post looks like.

51c72a08bed7de3314375bf0

· Posts