A light that gets FB notifications
What you’ll learn: How to create a device that lights up when you get a new notification on Facebook
What you'll need:
- A WiFly Module ($35)
- An Arduino ($30)
- An LED
- A resistor (~500 ohms)
Completed the Wifly Setup tutorial and have a set up Arduino that can talk to the internet.
Wire up the LED in series with the resistor betweein Pin 13 and the ground pin of the Arduino.
Then open up notificationlight.ino
from the notificationlight example in the lifegraph repo. You'll need to change the network name and the password to work with your Wifi network
const char mySSID[] = "your_ssid";
const char myPassword[] = "your_password";
We'll also need an authentication token from Facebook in order to get the right notification information. For a temporary access token, follow the 1 hour auth instructions. There's also a Facebook proxy at lifegraphconnect.com that will allow you to have 2 month tokens.
- Go to the Graph API Explorer: https://developers.facebook.com/tools/explorer and request a token.
- Enable the "manage_notifications" permissions underneath the "Extended Permissions" tab.
- Click "Get Access Token" and copy the auth token that shows up.
- These tokens only work for 1 hour so they should only be used for testing.
- Go to lifegraphconnect.com/notificationlight and log in
- The app needs your Facebook notification information permission to work.
- Click on the "View Token" button to view your auth token
- Copy the auth token
After you get your access token, you'll need to stick it in the notificationlight.ino
as well:
const char access_token[] = "...";
Save the code and then load it up onto an Arduino.
- GraphButton - press the button and have it post a message to your Facebook