Skip to content

Instantly share code, notes, and snippets.

@antimatter15
Created May 29, 2012 12:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save antimatter15/2828107 to your computer and use it in GitHub Desktop.
Save antimatter15/2828107 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
@gengkev
Copy link

gengkev commented Jun 3, 2012

Facebook has its own query language? O.o

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment