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
(* | |
Requires creation of a webhook on https://bouncie.dev to post to an Apache CouchDB database exposed to the Internet. | |
Substitute '6984' as the port number if you prefer a secure connection after setting up SSL according to the Apache | |
CouchDB Instructions. | |
The 'tripData' view used here to retrieve just tripData entries is as follows in CouchDB: | |
function (doc) { | |
if (doc.eventType == 'tripData') | |
emit(doc.data, null); |
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
#!/usr/local/bin/pwsh | |
$access_token="<INSERT FACEBOOK ACCESS TOKEN HERE: https://developers.facebook.com/tools/accesstoken/" | |
$data = invoke-restmethod "https://graph.facebook.com/v18.0/me/posts?fields=title,application,backdated_time,caption,child_attachments,id,coordinates,created_time,description,event,full_picture,message,name,object_id,parent_id,place,scheduled_publish_time,status_type,story,type,updated_time,attachments,comments,link,permalink_url,reactions&limit=100&access_token=$access_token" -ErrorAction Stop | |
while ($true) { | |
foreach ($p in $data.data) { | |
if ($p.backdated_time -ne $null) { | |
$posttime = $p.backdated_time.toString('s').replace('T', ' ') | |
} | |
else { |