Cómo obtener estadísticas de tu sitio a través de la API de Facebook

  • Autor Autor heyfranks
  • Fecha de inicio Fecha de inicio
H

heyfranks

Gamma
Programador
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Mirando la api me encontré algo interesante que puede servir como estadisticas.

Insertar CODE, HTML o PHP:
http://api.facebook.com/restserver.php?method=links.getStats&urls=[URL aqui]

ejemplo

Insertar CODE, HTML o PHP:
http://api.facebook.com/restserver.php?method=links.getStats&urls=forobeta.com

resultado

PHP:
<links_getStats_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
<link_stat>
<url>
forobeta.com
</url>
<normalized_url>
http://www.forobeta.com/
</normalized_url>
<share_count>
104
</share_count>
<like_count>
88
</like_count>
<comment_count>
18
</comment_count>
<total_count>
210
</total_count>
<click_count>
0
</click_count>
<comments_fbid>
10150108161281232
</comments_fbid>
<commentsbox_count>
0
</commentsbox_count>
</link_stat>
</links_getStats_response>

Saludos
 
interesante.. y el rango de tiempo para esas estadísticas cual es?
 
Mirando la api me encontré algo interesante que puede servir como estadisticas.

Insertar CODE, HTML o PHP:
http://api.facebook.com/restserver.php?method=links.getStats&urls=[URL aqui]

ejemplo

Insertar CODE, HTML o PHP:
http://api.facebook.com/restserver.php?method=links.getStats&urls=forobeta.com

resultado

PHP:
<links_getStats_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
<link_stat>
<url>
forobeta.com
</url>
<normalized_url>
http://www.forobeta.com/
</normalized_url>
<share_count>
104
</share_count>
<like_count>
88
</like_count>
<comment_count>
18
</comment_count>
<total_count>
210
</total_count>
<click_count>
0
</click_count>
<comments_fbid>
10150108161281232
</comments_fbid>
<commentsbox_count>
0
</commentsbox_count>
</link_stat>
</links_getStats_response>

Saludos

De igual manera el RestServer facebook lo saco en el ultimo roadmap, tan en los ultimos dias de eliminar todo. Para ver las estadisticas de tu sitio:

PHP:
https://graph.facebook.com/fql?q=select click_count,comment_count,comments_fbid,commentsbox_count,like_count,share_count from link_stat where url = "http://forobeta.com/"
o
PHP:
http://graph.facebook.com/?id=http://forobeta.com

mas info: http://developers.facebook.com/docs/reference/fql/link_stat/
 
Atrás
Arriba