How can I receive notification when some one likes my Facebook Page or Comments on some post ? Is there any graph or FQL query ?
I have tested the rss feeds page , they dont seem to get updated frequently , have also tested the following FQL query , doesnt seem to work
SELECT notification_id, sender_id, title_html, body_html, href FROM notification WHERE recipient_id=me()
You can get the number of likes using a query.
In PHP, for example, you can get the result like this:
$json = file_get_contents('https://graph.facebook.com/cocacola?fields=likes'); $obj = json_decode($json); $likes = $obj["likes"];
You can poll that count, say, once every 15 seconds. If the count is greater than the last poll, you can i.e. sound a buzzer on your desk using Arduino:
$serial = new phpSerial; $serial->deviceSet("/dev/ttyAMA0"); $serial->confBaudRate(115200); $serial->confParity("none"); $serial->confCharacterLength(8); $serial->confStopBits(1); $serial->deviceOpen(); $serial->sendMessage("<ding>"); $serial->deviceClose();