Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 80 lines (66 sloc) 2.846 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
<!Doctype html>
<html>
    <head>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script type="text/javascript" src="jquery.facebook.multifriend.select.js"></script>
        <link rel="stylesheet" href="jquery.facebook.multifriend.select-list.css" />
        <style>
            body {
                background: #fff;
                color: #333;
                font: 11px verdana, arial, helvetica, sans-serif;
            }
            a:link, a:visited, a:hover {
                color: #666;
                font-weight: bold;
                text-decoration: none;
            }
        </style>
    </head>
    <body>

        <div id="pageBody">
            <div id="fb-root"></div>
            <script src="http://connect.facebook.net/en_US/all.js"></script>
            <script>
                FB.init({appId: '194478650562619', cookie: true});

                FB.getLoginStatus(function(response) {
                    if (response.session) {
                      init();
                    } else {
                      // no user session available, someone you dont know
                    }
                });


                function login() {
                    FB.login(function(response) {
                        if (response.session) {
                            init();
                        } else {
                            alert('Login Failed!');
                        }
                    });
                }

                function init() {
                  FB.api('/me', function(response) {
                      $("#username").html("<img src='https://graph.facebook.com/" + response.id + "/picture'/><div>" + response.name + "</div>");
                      $("#jfmfs-container").jfmfs({ max_selected: 1, max_selected_message: "{0} of {1} selected"});
                      $("#logged-out-status").hide();
                      $("#show-friends").show();
  
                  });
                }


                $("#show-friends").live("click", function() {
                    var friendSelector = $("#jfmfs-container").data('jfmfs');
                    $("#selected-friends").html(friendSelector.getSelectedIds().join(', '));
                });


              </script>
              
              <div id="logged-out-status" style="">
                  <a href="javascript:login()">Login</a>
              </div>

              <div>
                  <div id="username"></div>
                  <a href="#" id="show-friends" style="display:none;">Show Selected Friends</a>
                  <div id="selected-friends" style="height:30px"></div>
                  <div id="jfmfs-container"></div>
              </div>
        </div>
    </body>
</html>

Something went wrong with that request. Please try again.