index.html
Find my Facebook ID
Facebook ID
Just the ID. No ads.
Apı, PHP ve JS Uzmanı Biri Bakabilir mi Kodlara! |
1 Mesajlar | 368 Okunma |
Find my Facebook ID
Facebook ID
Just the ID. No ads.
'use strict';
var searchInput = $('#search-input');
var resultsDiv = $('#results');
var linksDiv = $('#links');
var form = $('#form');
var apiUrl = 'https://api.fbid.varal7.fr/';
//var apiUrl = 'http://localhost:8001/';
resultsDiv.hide();
linksDiv.hide();
form.on('submit', function() {
var url = searchInput.val();
var html = '';
resultsDiv.html(html);
resultsDiv.show();
displayId(url);
gtag('event', 'click_find', {
'event_label': 'Form',
'event_category': 'find_id',
'value': url
});
return false;
});
function displayId(url) {
console.log("Search fb id for", url);
$.getJSON(apiUrl + '?url=' + url, function (data) {
var html="Found it!
";
html += "
";
html += "" + data.id + "
";
resultsDiv.html(html);
linksDiv.html(links);
linksDiv.show();
}).fail(function( jqxhr, textStatus, error ) {
var html="Sorry, no results found
";
resultsDiv.html(html);
});
}