GithubHelp home page GithubHelp logo

fbeventgender's Introduction

fbeventgender Build Status Dependency Status devDependency Status

Facebook event gender with brute force.

screenshot

Limitations

The application uses the Facebook Graph API and is subject to limitations.

API rate limiting

How to use

First of all, is required have an Facebook App See more

After, it's just put the id of app here app.js:

window.fbAsyncInit = function() {
    FB.init({
      appId      : '{ID_OF_YOUR_APP}',
      xfbml      : true,
      version    : 'v2.5'
    });
  };

make a login with an account and you have it.

How does it work

More names... more you'll be able to map. It's very simple, is just a chain of assync functions.

    function attCountName() {
        FB.api('https://graph.facebook.com/'+$scope.eventId.value+'?fields=attending_count,name',
                    function (response) {
                      if (response && !response.error) {
                       $scope.eventAttendingCount = parseInt(response.attending_count);
                       $scope.eventname = response.name;
                       $scope.maleCount = 0;
                       $scope.femaleCount = 0;
                       $scope.mappedAttendings = 0;
                       $scope.$applyAsync();
                      }
                    }
        );
    }
    
    function firstNamesReq() {
        var def = $q.defer();
              FB.api('https://graph.facebook.com/'+$scope.eventId.value+'/attending?pretty=0&limit='+1300,
                     function (response) {
                       if (response && !response.error){
                        hasNextNames(response);
                        calcNames(response.data);
                        $scope.$applyAsync(); 
                        def.resolve(); 
                       } else {
                          def.reject(response.error);
                       }
                     }
              );
          return def.promise;
    }

    function nextNames() {
        if(eventNextNames != null){
            FB.api(eventNextNames,
                     function (response) {
                       if (response && !response.error){
                        hasNextNames(response);
                        calcNames(response.data);
                        $scope.$applyAsync(); 
                        return nextNames();
                      } 
              });
            } else {
               $scope.mappedPercent = 100; 
               return null;
            }
    }

and the execution...

	  $scope.search = function() {
      var chain = $q.when();
      chain.then(attCountName())
           .then(
                firstNamesReq().then(function() {
                  nextNames();
                }, function(reason) {
                   console.log(reason);
                }));
    };

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.