Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

The Selective Tweets Facebook app for selectively posting tweets to your Facebook profile and/or page(s)

branch: master

Oops, Twitter disabled HTTP/1.0 - quickly update phirehose lib to lat…

…est version to fix (I really wish I had time to set up requiring dependencies in a sensible way :( ..)
latest commit ba99461a3f
Andy Young authored
Octocat-spinner-32 app fix include
Octocat-spinner-32 cli app under git
Octocat-spinner-32 config correct example constant names
Octocat-spinner-32 cron app under git
Octocat-spinner-32 lib Oops, Twitter disabled HTTP/1.0 - quickly update phirehose lib to lat…
Octocat-spinner-32 templates couple o fixes in the cold light of day
Octocat-spinner-32 www couple o fixes in the cold light of day
Octocat-spinner-32 wwwadmin app under git
Octocat-spinner-32 LICENSE app under git
Octocat-spinner-32 README.md added link to blog post
Octocat-spinner-32 logs app under git
README.md

Selective Tweets

Copyright 2009-2012 Andy Young andy@apexa.co.uk @andyy

License: MIT

https://github.com/andyyoung/Selective-Tweets

This is the source code for Selective Tweets - an app that enables people that use both Facebook and Twitter to cross-post Tweets to their Facebook profile or page using the #fb hashtag.

The app can be found at: http://apps.facebook.com/selectivetwitter/

Source code released January 2012 under the MIT licence. You are free to use this code for educational purposes, create derivative works and redistribute so long as you retain the original licence and copyright notices acknowledging myself as the original author. Be innovative, don't be evil.

The Story

I wrote up the story behind this app and how it collected 1M users in this blog post.

Requirements

Pretty simple:

  • PHP under Linux
  • A web server (I use Apache)
  • MySQL database
  • Cron for scheduling jobs

How it works

The app provides a web interface based on the Facebook PHP SDK enabling users logged into Facebook to configure a Twitter account to watch for tweets. It then collects tweets containing the #fb hashtag using Twitter's streaming API and stores them in a database-based queue (MySQL). A daemon run every couple of minutes processes the queue of tweets, matches them against records of Facebook profiles/pages and compiles Facebook Graph API batch requests to cross-post updates as appropriate.

To get set up

  • Edit config/config.php
  • Create DB according to config/database_schema.sql
  • Make www/ available under a webserver
  • Execute cron/check_stream_tracker.php to start tracking the twitter stream
  • Run the CLI scripts under cron/ on a regular basis to do the work

References

Have fun!

Andy Young

T: @andyy

E: andy@apexa.co.uk

B: http://www.insomanic.me.uk

Something went wrong with that request. Please try again.