copies your Facebook checkins to your WordPress blog
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
static
.gitignore
README.md
app.py
app.yaml

README.md

OwnYourCheckin

Watches for your Facebook checkins and copies them to your WordPress blog. A form of automated PESOS. Similar to and inspired by OwnYourGram. More background.

This is not easy for the average user to set up. It would take a lot more work to make it a fully usable service like OwnYourGram. You can definitely get it up and running for yourself if you're not afraid to dive into technical details, though!

Uses Facebook's Real Time Updates and the WordPress.com REST API (available to self-hosted blogs via Jetpack).

This project is placed in the public domain. You may also use it under the CC0 license.

TODO: If the checkin includes a picture, this "attaches" it to the WordPress post, which injects the <img> tag for it above the post body. Change that so it ends up below the post body.

Setup

  1. Clone this repo.

  2. Create a new WordPress.com app.

  3. Install the Jetpack plugin in your WordPress site, connect it to your WordPress.com account, and enable the JSON API feature.

  4. Generate an OAuth token for your WordPress.com app and put it into a file called wordpress.com_access_token in the repo root dir. (Sadly, I haven't found a way to generate this token manually. I generated mine by running oauth-dropins locally and filling in my app's id and secret in the wordpress.com_client_id and wordpress.com_client_secret files.)

  5. Create a Facebook app.

  6. Open the Graph API Explorer, select your app from the Application drop-down, and click Get App Token. Copy the token into a file called facebook_app_token in the repo root dir.

  7. Get a Facebook access token for your own user with the offline_access, read_stream, and user_photos scopes and put it in a file called facebook_access_token in the repo root dir.

    If you have one lying around, for any app, great! I used mine from Bridgy. Otherwise, you'll have to generate one, and I haven't yet found a good manual/interactive way. (The Graph API Explorer doesn't let you ask for offline_access. :/)

  8. Create an App Engine app, replace ownyourcheckin in app.yaml with your app id, and deploy.

  9. Subscribe to Real Time Updates for your own Facebook posts with this command. Fill in APP_ID and ACCESS_TOKEN and replace ownyourcheckin with your App Engine app id.

curl https://graph.facebook.com/v2.2/APP_ID/subscriptions \
  -d 'object=user&fields=feed&callback_url=https://ownyourcheckin.appspot.com/user_feed_update&verify_token=fluffernutter&access_token=ACCESS_TOKEN'

...and you're done! Post a checkin on Facebook, and it should automatically create a new post on your WordPress site.