Hello,
How to create Kirby content from Facebook events?
A client wants to be able to automate the creation of a page inside his kirby website when he creates a facebook event. Do you think it could be done? How?
Thanks
Hello,
How to create Kirby content from Facebook events?
A client wants to be able to automate the creation of a page inside his kirby website when he creates a facebook event. Do you think it could be done? How?
Thanks
yes, and the part related to events is here: https://developers.facebook.com/docs/graph-api/reference/event/
But how do you think we could automate the importation of this events on the Kirby side?
The simplest way would be to use a Cronjob that runs every few hours. If you need to create the Kirby page instantly, you could alternatively create a Panel widget with a button that manually runs the script to fetch the events.
Ok thanks @lukasbestle
So a cronJob can use the facebook api and create a text file to populate kirby?
Is that it?
Well, no. A Cronjob can only call an arbitrary script. You need to develop that script of course.
ok I understand.
a php script using facebook API is called by the cron job and creates Kirby content.
Thanks a lot
Exactly.
One hint: The script can use the $pages->create()
method, which will create the pages for you.