mikahanninen / grav-plugin-facebook

Facebook plugin for Grav CMS https://github.com/getgrav/grav
MIT License
16 stars 12 forks source link

CLI Command for fetching events as pages #29

Closed karfau closed 5 years ago

karfau commented 7 years ago

This is my PR for #26, at least this is what worked for me.

I think there is room for improvement on many levels, but first wanted to hear your opinion.

Besides adding the functionality, I moved some code from facebook.php to classes/FacebookEvents.php to reuse code in both facebook.php and the new cli/FetchEventsCommand.php.

Usage (after configuring page id and facebook credentials):

[php] bin/plugin facebook fetch-events [user/pages/events]

Best Christian

mikahanninen commented 7 years ago

I am reviewing your pull request and fixing some issues mainly due to the case that event does not necessarily have 'original_end' property. But seems good so far.

mikahanninen commented 7 years ago

Can you tell me what is the purpose of date and unpublish_date in the facebook.event.page.md.twig file ? Why they are just not original_start and original_end ?

karfau commented 7 years ago

Great, haven't thought about the case of original_end date not being set. (Isn't the parsing in the plugin setting it to the start date when it is not present?)

These fields are "special names" for pages in Grav:

If you want anything added/ documented/ cleared up from my side just tell me!

karfau commented 5 years ago

Since facebook events are no longer working anyways (at least when I last checked, I'll close this PR