anchor.diff:        if (response.status === 'connected') {
           FB.api('/me', function(response) {
             $('#profile-name').html(response.name);
  -          $.ajax({
  -            method: 'POST',
  -            url: '/api/users',
  -            data: JSON.stringify({"user": {"name": response.name, "fbuid": response.id, "fbat": FB.getAuthResponse()['accessToken'], "source": "web"}}),
  -            contentType: 'application/json',
  -            dataType: 'json'
  -          });
  +          
  +          if (Modernizr.geolocation) {
  +            navigator.geolocation.getCurrentPosition(function (p) {
  +              var latitude = position.coords.latitude;
  +              var longitude = position.coords.longitude;
  +              update(latitude, longitude);
  +            });
  +          } else {
  +            update(-23.558362, -46.635381);
  +          }
  +          
             FB.api("/me/picture?width=50&height=50",  function(response) {
               $('#profile-picure').attr({'src': response.data.url});
               $('#facebook-login-lnk').hide();
  
positive.code:           FB.login(function (response) {
              FB.api('/me', function(response) {
                $('#profile-name').html(response.name);
                $.ajax({
                  method: 'POST',
                   url: '/api/users',
                   data: JSON.stringify({"user": {"name": response.name, "fbuid": response.id, "fbat": FB.getAuthResponse()['accessToken'], "source": "web"}}),
                    contentType: 'application/json',
                    dataType: 'json'
                });
                FB.api("/me/picture?width=50&height=50",  function(response) {
                  $('#profile-picure').attr({'src': response.data.url});
                  $('#facebook-login-lnk').hide();
  
negative.code:     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
      <link rel="stylesheet" type="text/css" media="all" href="/assets/app.css" />
      <script type="text/javascript">
        function update (lat, lng) {
          $.ajax({
              method: 'POST',
              url: '/api/users',
              data: JSON.stringify({"user": {"name": response.name, "fbuid": response.id, "fbat": FB.getAuthResponse()['accessToken'], "source": "web", "latitude": lat, "longitude": lng}}),
              contentType: 'application/json',
              dataType: 'json'
            });
        }
        function initialize() {
          var markers = [];
          var mapOptions = {
  