T
Totality Leon
Alfa
Programador
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
La quieres sacar tu mismo o cuando el usuario entre a tu web.??
Por que si es cuando el usuario entre a tu web necesitarías una app y que haga login!
La quiero sacar yo mismo mediante la URL, como en esta web
findmyfbid.com
<?php
$p = $_GET['p'];
$html = file_get_contents('https://facebook.com/'.$p);
preg_match('|<meta property="al:android:url" content="fb://profile/(.*)" />|sU', $html, $meta);
echo $meta[1];
?>
Prueba con este codigo...
PHP:<?php $p = $_GET['p']; $html = file_get_contents('https://facebook.com/'.$p); preg_match('|<meta property="al:android:url" content="fb://profile/(.*)" />|sU', $html, $meta); echo $meta[1]; ?>
<?php
// by Dieguit0sk8
$url = 'https://www.facebook.com/edgar.sanchezcamacho';
$ch = curl_init();
$timeout = 0;
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0');
curl_setopt($ch,CURLOPT_HTTPHEADER,array('Accept-Language: es-es,en'));
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_ENCODING, "UTF-8");
curl_setopt($ch,CURLOPT_REFERER, 'http://facebook.com');
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_BINARYTRANSFER,1);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
if (preg_match('|"entity_id":"(.*?)"}]|is',$data,$status)) {
$id = $status[1];
}
echo $id;
// Forobeta.com
?>
<?php
// by Dieguit0sk8
$fb = $_POST[url];
$host = $_SERVER[HTTP_HOST];
if (preg_match('/facebook.com/i', $fb)) {
$url = $fb;
$ch = curl_init();
$timeout = 0;
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0');
curl_setopt($ch,CURLOPT_HTTPHEADER,array('Accept-Language: es-es,en'));
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_ENCODING, "UTF-8");
curl_setopt($ch,CURLOPT_REFERER, 'http://facebook.com');
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_BINARYTRANSFER,1);
curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
$data = curl_exec($ch);
curl_close($ch);
if (preg_match('|"entity_id":"(.*?)"}]|is',$data,$status)) {
$id = $status[1];
$idx = '<h1>ID: '.$id.'</h1>';
}
}
// Forobeta.com
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Find my Facebook ID</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<style> #success-wrap,p.caption,p.credits{text-align:center}body{margin-top:1em}h1{margin-bottom:.5em}h3{margin:1.4em 0 .8em}form{margin-bottom:3em}label{font-weight:400;display:block;margin-top:2em}p.lead{color:#222}p.small{color:#777}p.caption{font-style:italic;margin-bottom:3.5em}p a{text-decoration:underline}p a.btn{text-decoration:none}#other-problems{font-size:1.2em;margin-top:2em}#success-wrap{margin-bottom:2.5em}#success-wrap code{font-size:50px;display:inline-block;margin-bottom:.5em}ul{font-size:15px;margin-bottom:2em}ul.examples{margin:1.1em 0}ul.examples li{margin-bottom:.25em}ul.examples.good code{color:green}li{margin-bottom:.75em}img{border:10px solid #ccc;margin:.75em 0 .5em;max-width:100%;height:auto}p.credits{margin-top:4em;opacity:.65} </style>
</head>
<body>
<div class="container" style="max-width: 600px;">
<h1>Find your Facebook ID</h1>
<p class="lead">
To find your Facebook personal numeric ID for fb:admins, social plugins, and more,
enter your <b>Facebook personal profile URL</b> below:
</p>
<form method="POST">
<div class="form-group">
<input
name="url"
type="text"
placeholder="https://www.facebook.com/YourProfileName"
class="input-lg form-control">
</input>
</div>
<button type="submit" class="btn btn-primary">Find numeric ID →</button>
</form>
<?php echo $idx; ?>
<h3>What's my personal profile URL?</h3>
<p>
Your Facebook personal profile URL is the the URL you get to when you click on your name
in the upper left of the Facebook home page. It <b>should look</b> something like this:
</p>
<ul class="examples good">
<li><code>https://www.facebook.com/JohnDoe</code></li>
<li><code>https://m.facebook.com/sally.struthers</code></li>
<li><code>https://www.facebook.com/profile.php?id=24353623</code></li>
</ul>
<p>
Your personal profile <b>does not</b> look anything like these examples:
</p>
<ul class="examples">
<li><code>https://www.facebook.com</code></li>
<li><code>Sally Struthers</code></li>
<li><code>sally@struthers.com</code></li>
</ul>
<p>
<b>Still struggling?</b> If you are logged into Facebook in your current browser,
you should be able to <a href="https://www.facebook.com/profile.php" target="_blank">click this link</a>,
and it will redirect you to your profile page. Then, copy the URL from your
browsers address bar and come back here to try again.
</p>
<h3>What's this all about?</h3>
<p class="small">
This tool helps you easily find your Facebook numeric personal ID for fb:admins social plugins and more!
For integrations of certain Facebook social plugins, like the "Like" button and
"Like box", and others, Facebook requires that you know your Facebook numeric user
ID. Unfortunately, they make this very difficult to find, especially if you have a
so-called "vanity" personalized profile URL. If you can't find your Facebook ID,
or don't know what it is and need it, just enter your full Facebook profile URL in
the above form, and we can scrape the ID from the code of your personal profile page.
</p>
<p class="small credits">
Made by the friendly fellows who brought you <a href="http://<?php echo $host; ?>/"><?php echo $host; ?></a>.
</p>
</div>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript"> (function() {
$.fn.shake = function (settings) {
var pos;
settings = settings || {};
$.extend(settings,{
'shakes': 2,
'distance': 14,
'duration': 250
});
return this.each(function () {
var $this = $(this);
pos = $this.css('position');
if (!pos || pos === 'static') {
$this.css('position', 'relative');
}
for (var x = 1; x <= settings.shakes; x++) {
$this
.animate({ left: settings.distance * -1 }, (settings.duration / settings.shakes) / 4)
.animate({ left: settings.distance }, (settings.duration / settings.shakes) / 2)
.animate({ left: 0 }, (settings.duration / settings.shakes) / 4);
}
});
};
var placeholders = [
'https://m.facebook.com/sally.struthers',
'https://www.facebook.com/profile.php?id=2345',
'https://www.facebook.com/YourProfileName',
];
var $input = $("input[type='text']"),
index = 0;
setInterval(function() {
$input.attr("placeholder", placeholders[index]);
index = index === 2 ? 0 : index + 1;
}, 2000);
$("form").on("submit", function() {
if ($input.val() == "" || $input.val().indexOf("@") !== -1) {
$input.shake();
return false;
}
});
}()); </script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
Fue facil sacar el id del perfil! les comento los pasos que segui.
1) entre al perfil https://www.facebook.com/edgar.sanchezcamacho con mi cuenta de facebook logeada, fui al codigo de fuente y busco la palabra "fb://profile/" para encontrar el ID del perfil.
2) Deslogue mi cuenta de facebook, entre al perfil nuevamente y me salia contenido no disponible. Fui al codigo de fuente, busque el ID del perfil ya que lo habia sacado con la cuenta logeada, y encontre aqui: ( entity_id":"100001225576782" ).
Les dejo el codigo para que lo revisen.
PHP:<?php // by Dieguit0sk8 $url = 'https://www.facebook.com/edgar.sanchezcamacho'; $ch = curl_init(); $timeout = 0; curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0'); curl_setopt($ch,CURLOPT_HTTPHEADER,array('Accept-Language: es-es,en')); curl_setopt($ch,CURLOPT_HEADER,0); curl_setopt($ch,CURLOPT_ENCODING, "UTF-8"); curl_setopt($ch,CURLOPT_REFERER, 'http://facebook.com'); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_BINARYTRANSFER,1); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $data = curl_exec($ch); curl_close($ch); if (preg_match('|"entity_id":"(.*?)"}]|is',$data,$status)) { $id = $status[1]; } echo $id; // Forobeta.com ?>
ACTUALIZACION CLON DE findmyfbid.com en 1 solo archivo.
VER DEMO
PHP:<?php // by Dieguit0sk8 $fb = $_POST[url]; $host = $_SERVER[HTTP_HOST]; if (preg_match('/facebook.com/i', $fb)) { $url = $fb; $ch = curl_init(); $timeout = 0; curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0'); curl_setopt($ch,CURLOPT_HTTPHEADER,array('Accept-Language: es-es,en')); curl_setopt($ch,CURLOPT_HEADER,0); curl_setopt($ch,CURLOPT_ENCODING, "UTF-8"); curl_setopt($ch,CURLOPT_REFERER, 'http://facebook.com'); curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_BINARYTRANSFER,1); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $data = curl_exec($ch); curl_close($ch); if (preg_match('|"entity_id":"(.*?)"}]|is',$data,$status)) { $id = $status[1]; $idx = '<h1>ID: '.$id.'</h1>'; } } // Forobeta.com ?> <!DOCTYPE html> <html lang="en"> <head> <title>Find my Facebook ID</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <style> #success-wrap,p.caption,p.credits{text-align:center}body{margin-top:1em}h1{margin-bottom:.5em}h3{margin:1.4em 0 .8em}form{margin-bottom:3em}label{font-weight:400;display:block;margin-top:2em}p.lead{color:#222}p.small{color:#777}p.caption{font-style:italic;margin-bottom:3.5em}p a{text-decoration:underline}p a.btn{text-decoration:none}#other-problems{font-size:1.2em;margin-top:2em}#success-wrap{margin-bottom:2.5em}#success-wrap code{font-size:50px;display:inline-block;margin-bottom:.5em}ul{font-size:15px;margin-bottom:2em}ul.examples{margin:1.1em 0}ul.examples li{margin-bottom:.25em}ul.examples.good code{color:green}li{margin-bottom:.75em}img{border:10px solid #ccc;margin:.75em 0 .5em;max-width:100%;height:auto}p.credits{margin-top:4em;opacity:.65} </style> </head> <body> <div class="container" style="max-width: 600px;"> <h1>Find your Facebook ID</h1> <p class="lead"> To find your Facebook personal numeric ID for fb:admins, social plugins, and more, enter your <b>Facebook personal profile URL</b> below: </p> <form method="POST"> <div class="form-group"> <input name="url" type="text" placeholder="https://www.facebook.com/YourProfileName" class="input-lg form-control"> </input> </div> <button type="submit" class="btn btn-primary">Find numeric ID →</button> </form> <?php echo $idx; ?> <h3>What's my personal profile URL?</h3> <p> Your Facebook personal profile URL is the the URL you get to when you click on your name in the upper left of the Facebook home page. It <b>should look</b> something like this: </p> <ul class="examples good"> <li><code>https://www.facebook.com/JohnDoe</code></li> <li><code>https://m.facebook.com/sally.struthers</code></li> <li><code>https://www.facebook.com/profile.php?id=24353623</code></li> </ul> <p> Your personal profile <b>does not</b> look anything like these examples: </p> <ul class="examples"> <li><code>https://www.facebook.com</code></li> <li><code>Sally Struthers</code></li> <li><code>sally@struthers.com</code></li> </ul> <p> <b>Still struggling?</b> If you are logged into Facebook in your current browser, you should be able to <a rel="nofollow" href="https://www.facebook.com/profile.php" target="_blank">click this link</a>, and it will redirect you to your profile page. Then, copy the URL from your browsers address bar and come back here to try again. </p> <h3>What's this all about?</h3> <p class="small"> This tool helps you easily find your Facebook numeric personal ID for fb:admins social plugins and more! For integrations of certain Facebook social plugins, like the "Like" button and "Like box", and others, Facebook requires that you know your Facebook numeric user ID. Unfortunately, they make this very difficult to find, especially if you have a so-called "vanity" personalized profile URL. If you can't find your Facebook ID, or don't know what it is and need it, just enter your full Facebook profile URL in the above form, and we can scrape the ID from the code of your personal profile page. </p> <p class="small credits"> Made by the friendly fellows who brought you <a rel="nofollow" href="http://<?php echo $host; ?>/"><?php echo $host; ?></a>. </p> </div> <script src="//code.jquery.com/jquery-2.1.4.min.js"></script> <script type="text/javascript"> (function() { $.fn.shake = function (settings) { var pos; settings = settings || {}; $.extend(settings,{ 'shakes': 2, 'distance': 14, 'duration': 250 }); return this.each(function () { var $this = $(this); pos = $this.css('position'); if (!pos || pos === 'static') { $this.css('position', 'relative'); } for (var x = 1; x <= settings.shakes; x++) { $this .animate({ left: settings.distance * -1 }, (settings.duration / settings.shakes) / 4) .animate({ left: settings.distance }, (settings.duration / settings.shakes) / 2) .animate({ left: 0 }, (settings.duration / settings.shakes) / 4); } }); }; var placeholders = [ 'https://m.facebook.com/sally.struthers', 'https://www.facebook.com/profile.php?id=2345', 'https://www.facebook.com/YourProfileName', ]; var $input = $("input[type='text']"), index = 0; setInterval(function() { $input.attr("placeholder", placeholders[index]); index = index === 2 ? 0 : index + 1; }, 2000); $("form").on("submit", function() { if ($input.val() == "" || $input.val().indexOf("@") !== -1) { $input.shake(); return false; } }); }()); </script> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </body> </html>
Al creador del post [MENTION=142104]Totality Leon[/MENTION] si puede editar el post agregando el codigo mas los paso que segui, asi los usuarios que entren ya tengan la solucion de entrada. Saludos y un gusto poder ayudarlos.
Hola como estas? Consulta podes sacar el campo sexo dependiendo de que estes usando. Si usas wordexpres tenes opciones de no mostrar ciertos campos. Tambíen lo podes hacer con una funcion javascirpt ejemplo.
codigo html.
<div id="sexo">
<div style="float: left">
<span>Sexo </sexo>
</div>
<div style="float: left">
<select >
<option value="1">Masculino</>
<option value="2">Femenino</>
</select>
</div>
</div>
en este caso el div contenedor es sexo con lo cual podes hacer un javascript que te lo oculta
esta es un funcion de jquery hide te oculta el campo
<script>
$("#sexo").hide();
</script>
Dependiendo de lo que tengas podes tener varias alternativas.
Saludos.
pregunta teniendo una lista de ID, que informacion pdoriamos conseguir? fecha de nacimiento?
Con la api o sin api?Como consigo sacar lo basico nombres y foto, es que ando desactualizado. Antes se podia, pero ahora ya no se puede directamente. No se si exista alguna forma para sacar el nombre, lo basico desde el ID. Me gustaria saber si alguien sabe?:encouragement:
Con la api o sin api?
Sin la api, sacar los datos solo con la id, el nombre, foto, etc. Saludos:encouragement:
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?