Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: how to calculate the facebook like in perl cgi

by romy_mathew (Beadle)
on Jun 17, 2011 at 15:44 UTC ( #910186=note: print w/ replies, xml ) Need Help??


in reply to Re: how to calculate the facebook like in perl cgi
in thread how to calculate the facebook like in perl cgi

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';

?>


Comment on Re^2: how to calculate the facebook like in perl cgi
Re^3: how to calculate the facebook like in perl cgi
by Anonymous Monk on Jun 17, 2011 at 15:59 UTC

      Thanks for the Post saw an article in O'Reilly

      http://answers.oreilly.com/topic/1595-how-to-measure-facebook-activity-with-the-facebook-api-and-perl/

      Am very new in perl and I tat code in the link actually giving error in my test file could you mind checking let us know if that actually work

      My main Idea is to get the like count i set up in my website

        That script won't compile as-is, it is missing use LWP::Simple qw' get ';
        See perlintro and Modern Perl

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-10-22 04:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls