Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Facebook Events importer

How does this look for the basis of a Facebook Events importer? https://www.apptha.com/blog/how-to-import-events-from-facebook/

Comments

  • This would be a really cool addition. The members app settings already provide a way to add your facebook app credentials, so we could use those and the next step would be a handler in the Events app that fetches and caches them.
  • Here's a working handler: https://gist.github.com/twheel/4a397f28d3532f339011

    It's part of a business directory, so it's looping through businesses, but it could work for users easily enough. I added some columns to the event table in the database: business_id, fb_id, venue_id, state, zip, latitude, longitude, and pending and also a businesses <-> events relationship to the Event model.

    It downloads the events and their thumbnails and marks them as pending. If they're in the database already and not marked pending it leaves them alone.

    The Facebook SDK needs to be installed and the path updated if necessary; facebook app_id and app_secret need to be configured.

  • This is really cool!

Sign In or Register to comment.