Rolf Meyer
/
Twitter
This is a simple lwip HTTPClient example it uses the HTTPClient class to update your twitter status.
main.cpp
- Committer:
- rolf
- Date:
- 2009-12-02
- Revision:
- 1:803d5168d739
- Parent:
- 0:5396f623478b
File content as of revision 1:803d5168d739:
#include "mbed.h" #include "HTTPClient.h" DigitalOut led(LED1); HTTPClient http; #error Insert username and password const char user[] = "<your twitter username>"; const char pass[] = "<your twitter password>"; const char msg[] = "status=Hello World from an mbed"; const char url[] = "http://twitter.com/statuses/update.xml"; int main(void) { http.auth(user, pass); http.post(url, msg, stdout); while(1) { led = !led; wait(0.2); } }