twitcurl is a pure C++ library for twitter APIs. twitcurl uses cURL for handling HTTP requests and responses. twitcurl has been tested on Microsoft Windows, Ubuntu and Debian. In fact, it works just fine on any operating system that supports cURL.
- v1.1 Twitter REST APIs
- JSON
- SSL
twitcurl supports OAuth authorization methods. Check twitterClient example code in trunk section to know about twitcurl OAuth flow. Also, check wiki page for more info: http://code.google.com/p/twitcurl/wiki/TwitcurlOAuthFlow
Currently twitcurl has wrappers for following twitter REST APIs:
Timeline methods:
statuses/public_timeline
statuses/friends_timeline
statuses/user_timeline
statuses/mentions
Status methods:
statuses/show
statuses/update
statuses/destroy
User methods:
users/show
statuses/friends
statuses/followers
Direct Message methods:
direct_messages
direct_messages/sent
direct_messages/new
direct_messages/destroy
Friendship methods:
friendships/create
friendships/destroy
friendships/show
Social Graph methods:
friends/ids
followers/ids
Account methods:
account/rate_limit_status
Favorite methods:
favorites
favorites/create
favorites/destroy
Block methods:
blocks/create
blocks/destroy
blocks/list
blocks/ids
Saved Search methods:
saved_searches
saved_searches/show
saved_searches/create
saved_searches/destroy
Trends methods:
trends
trends/current
trends/daily
trends/weekly
trends/available
- twitcurl source is available in the repository in "Source" tab.
- Includes Microsoft Visual C++ 6.0 and 2008 workspace for building on Windows; and Makefile for building on UNIX/Linux distroes.
- Use SVN or tools like TortoiseSVN (http://tortoisesvn.net/) to check-out and download files.
http://code.google.com/p/twitcurl/wiki/WikiHowToUseTwitcurlLibrary
- twitcurl returns JSON responses from twitter.com as it is. You need to have a JSON parser to parse the responses.
- twitcurl uses HMAC_SHA1 from http://www.codeproject.com/KB/recipes/HMACSHA1class.aspx
- twitcurl uses base64 from http://www.adp-gmbh.ch/cpp/common/base64.html
- Check out http://www.json.org/ for C/C++ parsers.
The Makefile in twitterClient is supposed to run under sudo, and the file is tested under Ubuntu 12.04.
- More info on cURL can be found here: http://curl.haxx.se/
- More info on twitter REST APIs can be found here: http://apiwiki.twitter.com/w/page/22554679/Twitter-API-Documentation
- More info on twitter OAuth authorization can be found here:
- Building cURL static library with SSL on Windows: http://swatrant.blogspot.in/2013/06/how-to-build-curl-static-library-with.html