Find Facebook friend in Red (Republican) States or Blue (Democratic) States based on their senators
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Summary

A Django Application which gives you a list of your friends in "Red States" or "Blue States." You can also use it to generate your own lists - for example, friends who live in states whose senators could swing certain votes.

Your friends' senators don't represent you, but you can ask your friends to contact their senators.

View it live on Heroku.

Generated URLs

When this project started, I used to search by state. Facebook has blocked that functionally, so instead, we now only find friends in the sixty most populous cities in each region. This is not ideal. We'd like the following links to work again:

Your Red Friends

Your Blue Friends

If you know anyone at Facebook who can re-enable searching by state, please ask them or put me in contact with them!

Credit

  • ProPublica provides a fantastic aggregation of data on MoCs.

  • Reddit user taniapdx has created the only mapping of states-to-facebook-codes that I could find on the web, and I assume it was manually and painstakenly collected.

  • This project was inspired by Indivisible Berkeley. #resist

Technical Details

Running the code

You need the following environment variables:

  • PROPUBLICA_API_KEY: obtain it here
  • DEBUG: set to "True" to enable, "False" to disable

After installing requirements and heroku CLI, you should be able to run heroku local to run it.

Why not use the Facebook API?

I originally tried to use the Facebook Graph Search API to get the representatives and senators for all your friends, but Facebook privacy settings prevent apps from accessing information about your friends. Generating a search URL for every district seems impossible, since congressional districts don't line up with searchable cities (and also because the search URL would contain every city in the US).

The original project using the Facebook API is available here: https://github.com/artoonie/django-redblue