Device Alarm will get you notified when your crush is online in FB messenger.
Are you keep checking you crush Facebook "last active" time stamp on your phone ?? to hang on ?? Want to make a casual hang on when is he/she online ?
I have an interesting solution for you......
This device will get you notify (Alarm) when a configured user become online in FB by checking last active status time stamp.
Server side integration (PHP + Facebook API)
- Enable the user to update his Facebook status from your application
- Display to the user's Facebook friends
- Display to the user's pages or application
- etc...
// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
char server[] = "server1.5gbfree.com";
// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192, 168, 0, 177);
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, ip);
}
// give the Ethernet shield a second to initialize:
delay(1000);
Serial.println("connecting...");
// if you get a connection, report back via serial:
if (client.connect(server, 80)) {
Serial.println("connected");
// Make a HTTP request:
client.println("GET /faceBookUserStatus?userId=Krishna HTTP/1.1");
client.println("Host: server1.5gbfree.com");
client.println("Connection: close");
client.println();
} else {
// if you didn't get a connection to the server:
Serial.println("connection failed");
}
}
void loop() {
// if there are incoming bytes available
// from the server, read them and print them:
if (client.available()) {
char c = client.read();
Serial.print(c);
}
// if the server's disconnected, stop the client:
if (!client.connected()) {
Serial.println();
Serial.println("disconnecting.");
client.stop();
// do nothing forevermore:
while (true);
}
}
I have an interesting solution for you......
This device will get you notify (Alarm) when a configured user become online in FB by checking last active status time stamp.
Server side integration (PHP + Facebook API)
The Facebook connect enable you to login a user into your website using his Facebook account, and the ability to request and display his Facebook information into your application or website.
Once a user has granted your application the permission to interact with his Facebook account, you can:
- Store the Facebook token into your database to authenticate the user in the future- Enable the user to update his Facebook status from your application
- Display to the user's Facebook friends
- Display to the user's pages or application
- etc...
The possibilities are large and depends on what you need to implement in your application.
Your can read the Facebook API documentation to learn more about it.
Your can read the Facebook API documentation to learn more about it.
Use facebook API and write a Rest service in PHP to expose User (He/She should be in your friend List) Last active status by looking at the last updated Timestamp. and host it in a free PHP server.
If you need more detail & Source code Contact me......
Consume PHP web service in Arduino Ethernet shield.
#include <SPI.h>
#include <Ethernet.h>// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// if you don't want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
char server[] = "server1.5gbfree.com";
// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192, 168, 0, 177);
// Initialize the Ethernet client library
// with the IP address and port of the server
// that you want to connect to (port 80 is default for HTTP):
EthernetClient client;
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println("Failed to configure Ethernet using DHCP");
// try to congifure using IP address instead of DHCP:
Ethernet.begin(mac, ip);
}
// give the Ethernet shield a second to initialize:
delay(1000);
Serial.println("connecting...");
// if you get a connection, report back via serial:
if (client.connect(server, 80)) {
Serial.println("connected");
// Make a HTTP request:
client.println("GET /faceBookUserStatus?userId=Krishna HTTP/1.1");
client.println("Host: server1.5gbfree.com");
client.println("Connection: close");
client.println();
} else {
// if you didn't get a connection to the server:
Serial.println("connection failed");
}
}
void loop() {
// if there are incoming bytes available
// from the server, read them and print them:
if (client.available()) {
char c = client.read();
Serial.print(c);
}
// if the server's disconnected, stop the client:
if (!client.connected()) {
Serial.println();
Serial.println("disconnecting.");
client.stop();
// do nothing forevermore:
while (true);
}
}
Based on the string value you received just activate buzzer in arduino UNO3.(Compare with current time stamp range)
Comments
Post a Comment