Skip to content

Instantly share code, notes, and snippets.

@vlhorton
Forked from antimatter15/download.sh
Created August 4, 2018 22:12
Show Gist options
  • Save vlhorton/c0a39294da2baf3d09f1821c491074f8 to your computer and use it in GitHub Desktop.
Save vlhorton/c0a39294da2baf3d09f1821c491074f8 to your computer and use it in GitHub Desktop.
#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
echo "\n" >> log.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment