jzimmerman2011
jzimmerman2011

Reputation: 1806

how to implement a facebook-like api?

i am going to be coding an api, and after playing around with the facebook api, i really like how they do things, especially with the url scheme they use.

for instance, with facebook you can do something like:

http://graph.facebook.com/me/friends

or something like it to get a JSON object of the friends of the user profile.

i know how to so something like that using query strings and whatnot, such as:

http://api.mysite.com/users.php?userid=...&feed=friends

does anyone here know how i can implement something similar to the facebook api with their url scheme? i really like how it flows (almost has a jQuery-like chainability effect to it).

i looked up the "mod_alias" module to apache, but couldn't determine if that is what i need...

thanks!

Upvotes: 3

Views: 516

Answers (1)

Paul DelRe
Paul DelRe

Reputation: 4039

Facebook is following a RESTful architecture pattern. I recommend you start your research on the same architecture. Here's the wikipedia article as a definition.

Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The term Representational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation. Fielding is one of the principal authors of the Hypertext Transfer Protocol (HTTP) specification versions 1.0 and 1.1.

Upvotes: 1

Related Questions