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.
API Basics
The WordPress.com Twitter API supports Basic AUTH. OAuth is not supported at this time. Users should use their WordPress.com username and password.
Our end-point for the Twitter API is http://twitter-api.wordpress.com. We also support secure connections at https://twitter-api.wordpress.com
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:
http://twitter-api.wordpress.com/category/method_call.format
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.
API Methods
This list of API methods is organized similar to Twitter’s API Documentation. Missing categories are not implemented on WordPress.com.
Timeline Methods
statuses/friends_timeline
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.
statuses/home_timeline
Same as statuses/friends_timeline
statuses/user_timeline
Users can request their most recently blog posts using this call.
Status Methods
statuses/update
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.
User Methods
users/show
Shows profile information about the specified blog and returns its latest post.
statuses/friends
Shows which blogs the authenticated user is subscribed to.
Friendship Methods
friendships/create
Subscribe to a blog
friendships/destroy
Unsubscribe from a blog
friendships/exists
Check whether the current user is following the specified blog or not
friendships/show
Shows the relationship between two users
Social Graph Methods
friends/ids
Returns the blogs the current user is subscribed to as a list of ids
Account Methods
account/verify_credentials
Use this method to authenticate a user and test if their credentials are valid (uses BASIC AUTH)
API Fields
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.
Recommended Reading
Still confused?
Help us improve:
We're always looking to improve our documentation. If this page didn't answer your question or left you wanting more, let us know! We love hearing your feedback. For support, please use the forums or contact support form. Thanks!