Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

how to calculate the facebook like in perl cgi

by romy_mathew (Beadle)
on Jun 17, 2011 at 15:20 UTC ( #910178=perlquestion: print w/ replies, xml ) Need Help??
romy_mathew has asked for the wisdom of the Perl Monks concerning the following question:

Hi Could anyone help me to get the count of facebook. I would like to know if there is a perl script that can fetch Facebook API to get Facebook activity stats for a webpage.

Comment on how to calculate the facebook like in perl cgi
Re: how to calculate the facebook like in perl cgi
by Anonymous Monk on Jun 17, 2011 at 15:31 UTC
    What does that mean?

    I have seen code but all require me to use Php.

    What code?

      I have found this piece of code in a blog http://blogs.coldbuffer.com/how-to-get-facebook-fan-count I would like to do the same in perl

      ?php

      require_once('facebook.php');

      $facebook = new Facebook(array( 'appId' => 'your_app_id', 'secret' => 'your_app_secret', 'cookie' => true, ));

      $result = $facebook->api(array( 'method' => 'fql.query', 'query' => 'select fan_count from page where page_id = your_page_id;' ));

      $fb_fans = $result[0]'fan_count';

      ?>
      OP revised post without notice; has been childed for doing so. AM's answer was directly responsive to OP's original content.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://910178]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-08-20 12:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (113 votes), past polls