application-amicale-serveur/facebook/facebook_update.sh

11 lines
419 B
Bash
Raw Normal View History

#!/bin/bash
2020-03-14 16:02:20 +01:00
2020-06-24 14:38:22 +02:00
# A token is required to access the facebook public page
# This token must be saved in a file named "token" in the same folder as this script
# /!\ Do not sync this token with git /!\
2020-03-14 16:02:20 +01:00
touch lock
2020-06-24 14:38:22 +02:00
token=$(cat token)
curl "https://graph.facebook.com/v7.0/amicale.deseleves/published_posts?fields=full_picture,message,permalink_url,created_time&date_format=U&access_token=$token" > facebook_data.json
2020-03-14 16:02:20 +01:00
rm lock