/notificationlight

light that turns on when you have a facebook notification

Primary LanguageArduino

Notification Light

A light that gets FB notifications

Light Tutorial

What you’ll learn: How to create a device that lights up when you get a new notification on Facebook

What you'll need:

Prerequisites

Completed the Wifly Setup tutorial and have a set up Arduino that can talk to the internet.

The Arduino

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";

Authentication with Facebook

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.

Single user, temporary access token

  1. Go to the Graph API Explorer: https://developers.facebook.com/tools/explorer and request a token. get token
  2. Enable the "manage_notifications" permissions underneath the "Extended Permissions" tab.
  3. Click "Get Access Token" and copy the auth token that shows up.
  4. These tokens only work for 1 hour so they should only be used for testing.

Multiple user, physically-linked access token

  1. Go to lifegraphconnect.com/notificationlight and log in
  2. The app needs your Facebook notification information permission to work. allow access
  3. Click on the "View Token" button to view your auth token view token
  4. Copy the auth token auth token

Setting up your 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.

Further examples

  • GraphButton - press the button and have it post a message to your Facebook