<commit_before>function facebook_setup(appid) {
        window.fbAsyncInit = function() {
          FB.init({
            appId      : appid,
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true,
          });
        };

        (function(d){
           var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           d.getElementsByTagName('head')[0].appendChild(js);
         }(document));
       }<commit_msg>listen for facebook auth event<commit_after>function facebook_setup(appid) {
        window.fbAsyncInit = function() {
          FB.init({
            appId      : appid,
            status     : true, 
            cookie     : true,
            xfbml      : true,
            oauth      : true,
          });
          FB.Event.subscribe('auth.login', function(r)
              {
                  console.log(r.status);

                  if ( r.status === 'connected' )
                  {
                      // a user has logged in
                  }
              }
          );
        };

        (function(d){
           var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
           js = d.createElement('script'); js.id = id; js.async = true;
           js.src = "//connect.facebook.net/en_US/all.js";
           d.getElementsByTagName('head')[0].appendChild(js);
         }(document));
       }
{'fraction_non_alphanumeric': 0.1339343206696716, 'fraction_numerical': 0.00128783000643915, 'mean_word_length': 1.2719298245614035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4803667', 'n_tokens_mistral': 450, 'n_tokens_neox': 430, 'n_words': 81}