Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. require('../wp-blog-header.php');
  2. query_posts('&showposts=-1');
  3.  
  4. while (have_posts()) : the_post();
  5.  
  6. if ( has_post_thumbnail() ) {
  7. the_post_thumbnail( array(40,40) );
  8. }
  9.  
  10. $url = get_the_permalink();
  11. $json = file_get_contents( 'https://graph.facebook.com/fql?q=SELECT%20like_count,%20total_count,%20share_count,%20click_count,%20comment_count%20FROM%20link_stat%20WHERE%20url%20=%20%27' . $url . '%27' );
  12. $json_data = json_decode($json, false);
  13. echo $json_data->data[0]->total_count;
  14.  
  15. endwhile;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement