2017 © Pedro Peláez
 

library stitcher-fb-events

Sync Facebook events

image

pageon/stitcher-fb-events

Sync Facebook events

  • Saturday, May 20, 2017
  • by Pageon
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 14 % Grown

The README.md

Stitcher Facebook events plugin

This plugin adds support to sync events from multiple Facebook pages and show them in a Stitcher project., (*1)

composer require pageon/stitcher-fb-events
# Project config file

plugins:
    - Pageon\Stitcher\FbEventsPlugin

Usage

First of all, you'll need to generate a Facebook API access token. A Facebook developer account is required, with a registered app. More info can be found on the 'Facebook for developers' page., (*2)

With an app id and an app secret, you'll be able to generate the access token., (*3)

GET https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials

This token should be added in your project's config file., (*4)

# config.yml

fb.events.access.token: 1111111111111|adsdbkjabd234234111

Next, you'll need to add the page IDs you want to sync., (*5)

# config.yml

fb.events.pages:
    - 147370815293145
    - ...

Finally the command to sync facebook events can be run., (*6)

./stitcher fb:event:sync

Configuration

Besides the access token and page ids, you can also specify how many days in the past and future events should be searched for. These parameters both default to 7. Besides the day limits, you can also configure a file in which Stitcher should save the loaded data., (*7)

fb.events.days.past: 7
fb.events.days.future: 7
fb.events.file: data/_fb_events.yml

Usage

After running the fb:events:sync command, a file data/_fb_events.yml will be available. These entries can be used the same way as any other data file., (*8)

# site.yml

/events:
    template: events
    variables:
        events: data/_fb_events.yml

You'd probably want a cronjob or manual trigger to update the data and re-render the events page., (*9)

The Versions

20/05 2017

dev-master

9999999-dev

Sync Facebook events

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar brendt

20/05 2017

dev-develop

dev-develop

Sync Facebook events

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar brendt