Using WordPress.com through the Twitter API
If you’re a software developer interested in talking to WordPress.com using the Twitter protocol–you’ve found the right page. If you’re a user, visit our Twitter API page to learn how to get real-time access to your blog subscriptions using a Twitter client that supports WordPress.com.
Twitter is a communication protocol where one can send a message without specifying a recipient. There are a lot of possibilities for Twitter as a protocol and we’re exploring this at WordPress.com.
Through the Twitter API, WordPress.com users can:
- Read and receive new post notifications from blogs they’re subscribed to using the Blog Surfer feature
- Post a “status update” to one of their WordPress.com blogs
On this page you’ll learn which Twitter APIs WordPress.com supports, the WordPress.com Twitter API conventions, and other resources to look at.
The WordPress.com Twitter API supports Basic AUTH. OAuth is not supported at this time. Users should use their WordPress.com username and password.
The Twitter API is a RESTful API. Requests are made over HTTP and the response is returned using the format you specify. The general format of a Twitter API request is:
The available categories and methods are shown in the next section. The formats available are RSS, XML, and JSON. The WordPress.com Twitter API supports each of these.
This list of API methods is organized similar to Twitter’s API Documentation. Missing categories are not implemented on WordPress.com.
Individual blog posts on WordPress.com are status updates. With this call you will receive recent posts from the blogs the user is subscribed to.
Same as statuses/friends_timeline
Users can request their most recently blog posts using this call.
This method is similar to its Twitter counterpart. It lets you make a blog post. You may specify a post with a title using “post title::post body”. If you specify an identifier for a blog, the post will go there. Otherwise the post goes to the default blog of the authenticated user.
Shows profile information about the specified blog and returns its latest post.
Shows which blogs the authenticated user is subscribed to.
Subscribe to a blog
Unsubscribe from a blog
Check whether the current user is following the specified blog or not
Shows the relationship between two users
Social Graph Methods
Returns the blogs the current user is subscribed to as a list of ids
Use this method to authenticate a user and test if their credentials are valid (uses BASIC AUTH)
Each of the API methods returns different fields. Here are how these fields map onto WordPress.com.
description is the tag line description of the blog.
id is a number that identifies a blog.
name is the WordPress.com username of the author of the post.
profile_image_url is a link to the Gravatar of the post author. If no Gravatar is available the Blavatar for the blog is used instead.
screen_name is the address of the blog without the http://.
text is an excerpt or shortened snippet (up to 140 characters) of the post.
url is the URL of the blog.