Skip to content

Instantly share code, notes, and snippets.

#https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=1686802955
accesstoken=`cat authkey.txt`
curl "https://graph.facebook.com/fql?q=SELECT%20uid%2C%20name%2C%20online_presence%20FROM%20user%20%20WHERE%20online_presence%20IN%20('active'%2C%20'idle')%20AND%20uid%20IN%20(SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20%3D%20me())&access_token=$accesstoken" > tmp.txt
if grep -q Error < tmp.txt; then
echo "Error"
notify-send "Update the auth key"
fi
date >> log.txt
cat tmp.txt >> log.txt