Giter VIP home page Giter VIP logo

fb-genderratio's Introduction

Gender Ratio Calculator for Facebook Events (Python)

fbratio.py is a small Python script that pulls guest information for a Facebook event, and then determines their gender using first names through calls to the Genderize.io API. Works with Facebook's Graph API, no need to install Chrome extensions or viewing only the "Going" list.

Installation

Running the Program

Getting a User Access Token

  1. Go to Facebook for Developer's Graph API Explorer.
  2. On the top right of the Graph API Explorer, click on Get Token -> Get User Access Token.
  3. Check "user_events" under Events, Groups & Pages.
  4. Click Get Access Token; Facebook will request the appropriate permissions. Facebook needs permissions to retrieve information from the Graph API.
  5. The User Access Token will appear in the textbox located in the top, copy the token and save for later.

Executing the Script

In a terminal window, run the ratio.py with the following line.

python fbratio.py

The program will then ask for the User Access Token and Facebook event identifier. You can get the Facebook event ID from the event URL.

https://www.facebook.com/events/(EventID)/

Command Line Arguments

  • -hc: Runs the hardcoded token and event in the header of fbratio.py
  • -i [token] [eventid]: Runs the inline arguments instead of prompting
  • -g: Prints the names of all guests.
  • -n: No call to the Genderize.io API

fb-genderratio's People

Contributors

srodriguez1850 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.