Skip to content

Commit

Permalink
Signed-off-by: Ricardo Godoy <[email protected]>
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Godoy committed Feb 2, 2013
1 parent 356c0b5 commit 309983a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions adicionar_local.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h2 class="p3" style="display:none;">Terceiro passo</h2>
<button id="step2">Já estou no lugar certo</button>
<input type="hidden" name="lat">
<input type="hidden" name="lng">
<input type="hidden" name="fb_id">
<input type="hidden" name="fb_id" id="fb_id">
</div>

<div id="passo-3" style="display:none;">
Expand Down Expand Up @@ -105,23 +105,23 @@ <h2 class="p3" style="display:none;">Terceiro passo</h2>
$('input[name=lat]').val(position.coords.latitude);
$('input[name=lng]').val(position.coords.longitude);
$('#passo-2').hide();
alert($('form').serialize());
FB.init({
appId : '594023257280586',
status: true, cookie: false, xfbml: false, oauth: true
});

FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
FB.api('/me', function (r) {
document.querySelector('#fb_id').value = r.id;
$.ajax (url:'',data:$('form').serialize())
});
}});
//$('#passo-3').show();
});
}

function step3 (evt) {
FB.init({
appId : '594023257280586',
status: true, cookie: false, xfbml: false, oauth: true
});

FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
FB.api('/me', function (r) {
alert(r.id)
});
}});
}

document.querySelector("#step1").addEventListener('click',step1);
Expand Down

0 comments on commit 309983a

Please sign in to comment.