Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
/ ownyourcheckin Public archive

copies your Facebook checkins to your WordPress blog

Notifications You must be signed in to change notification settings

snarfed/ownyourcheckin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

copies your Facebook checkins to your WordPress blog

Resources

Stars

Watchers

Forks