Created
April 3, 2017 00:09
-
-
Save TristanWiley/ad47d459818312e358fb15dff52bbd50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## declare an array variable | |
declare -a arr=("100003351194097", "1190589341", "100002607181556", "549728756", "759129034", "100015955369034"); | |
length="${#arr[@]}"; | |
# echo $length; | |
count=0; | |
for i in "${arr[@]}" | |
do | |
echo $(curl -sb -H "Accept: application/json" "https://graph.facebook.com/v2.8/"$i"?access_token=<API_TOKEN>" | jq -r '.name')","$i >> greetings.csv | |
((count++)); | |
echo $count"/"$length; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment