HOWTO Use the API

This guide will help you understand status.net's API and make a simple application.

= Download Software =

Download latest status.net release from here.

Alternative Advanced Method
Install from Git

= Install Software =

NOTE: More advanced installation instructions exist.


 * Put expanded files in desired directory on a web server
 * Ensure CURL & tidy is installed on your web server. If you are using Ubuntu this can be done by using the command (in the terminal):
 * sudo apt-get install php5-curl


 * Point your browser to /install.php
 * Follow instructions to apply appropriate permissions to various directories.
 * Reload /install.php after permissions are applied.
 * Follow onscreen directions to set up your administrator account.

= Write Simple Application =

This example is from the API documentation.


 * Open a commandline (terminal)
 * Familiarize yourself with CURL
 * Confirm you have an internet connection
 * Run this command by replacing username and password with your statusnet Installation username and password. Also Replace example.com with your StatusNet Installation such as http://rejon.status.net/api/statuses/update.xml
 * curl -u username:password http://example.com/api/statuses/update.xml -d status='Howdy!' -d lat='30.468' -d long='-94.743'


 * You should receive a similar response to the one below:

 Howdy! false Tue Mar 30 23:28:05 +0000 2010  26668724    30.468 -94.743 false 25803 Jed Sanders jedsanders Hoop and Holler, Texas I like to think of myself as America's Favorite. http://avatar.example.com/25803-48-20080924200604.png</profile_image_url> http://jedsanders.net false <followers_count>5</followers_count> <profile_background_color/> <profile_text_color/> <profile_link_color/> <profile_sidebar_fill_color/> <profile_sidebar_border_color/> <friends_count>2</friends_count> Wed Sep 24 20:04:00 +0000 2008</created_at> <favourites_count>0</favourites_count> <utc_offset>0</utc_offset> <time_zone>UTC</time_zone> <profile_background_image_url/> <profile_background_tile>false</profile_background_tile> <statuses_count>70</statuses_count> true true

Notice: If your apache does not have "Fancy URLs" enabled, the example url's from above need to change. (e.g. http://example.com/api/statuses/update.xml becomes http://example.com/index.php/api/statuses/update.xml )

Notice: If you are using curl to upload media files, use -F (--form) rather than -d in order to set the content-type header to "multipart/form-data".

= Advanced info =


 * API discovery

= External links =


 * http://status.net/docs/api/