Skip to Main Content
Adding Ajax
book

Adding Ajax

by Shelley Powers
June 2007
Intermediate to advanced content levelIntermediate to advanced
400 pages
9h 52m
English
O'Reilly Media, Inc.
Content preview from Adding Ajax

Adding Technorati to Our Mashup

Technorati is a weblog search engine that tracks posts by tags, as well as other search criteria. Its main site is at http://technorati.com.

As mentioned earlier, a commonly shared functionality in many of today's web services is the support of tags. Flickr has them, and so does Technorati. Technorati provides a mashup of its own, pulling in tag-related photos from Flickr and videos from YouTube to annotate its tag pages.

Technorati's API is a RESTful interface, supports both GET and POST requests, and requires a free API key. The API service we're interested in, tag, returns weblog entries that have associated a given tag with its post. The request has the following format, including the two required parameters:

http://api.technorati.com/tag?key=[apikey]&tag=[tag]

Other optional parameters are:

format

XML for XML, RSS for RSS 2.0

Limit

Default of 20, maximum of 100 blog entries to return

start

Used to provide paging, and if set to the limit amount plus one (limit+1), returns the next page of results

excerptsize

Number of word characters returned, 100 by default

Topexcerptsize

Number of word characters in first post returned, 150 by default

Technorati doesn't provide dynamic scripting and callback function support, which means we have to use a more formalized service request. Since the request is coming from another domain, we're going to have to create a proxy to make the service request on the server and pass the returned data back to the client.

PHP programs making ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ajax: The Definitive Guide

Ajax: The Definitive Guide

Anthony T. Holdener III
Ajax Design Patterns

Ajax Design Patterns

Michael Mahemoff
Web Development with JavaScript and Ajax Illuminated

Web Development with JavaScript and Ajax Illuminated

Richard Allen, Kai Qian, Lixin Tao, Xiang Fu

Publisher Resources

ISBN: 9780596529369Supplemental ContentErrata Page