Pages: [1]   Go Down
Author Topic: Lifegraph: A new library for connecting to JSON APIs like Facebook  (Read 872 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

After using the WiFlyHQ library for a couple of socially connected devices, I decided to wrap up the useful parts so other people can connect to Facebook, or any other JSON API.

The source code and examples are here:

A tutorial for setting up an Arduino and making a call to Facebook is here:
More tutorials:

Give it a try, and let me know what you think. I'll keep adding features to make this the most useful.

  // Make an HTTP request for
  Facebook.get ( NULL, "lifegraphlabs" );
  int status_code = Facebook.request();
  // The request is successful if it returns an HTTP status code
  // of "200" (HTTP OK). Update the light accordingly.
  digitalWrite(light, status_code == 200 ? HIGH : LOW);

  // Notify terminal of our status.
  Serial.print("HTTP Status Code: ");

Pages: [1]   Go Up
Jump to: