I am working on a Facebook app that will allows users to vote on their favorite pictures, based on their friend's profiles pictures. I know how to display the images, just not how to get the list of the current user's friend's IDs. My application is written in PHP. This is the last thing I need to complete the app. Any help would be great!
This is my code: (Just to display each user ID on the page)
<?php
include_once 'facebook.php';
$apikey = 'API KEY HERE';
$secretkey = 'SECRET KEY HERE';
$fbObj = new Facebook($apikey, $secretkey);
$myuid = $fbObj->require_login();
$friends = $fbObj->api('$myuid/friends');
echo $friends;
?>
That code raises the following PHP error:
PHP Fatal error: Call to undefined method Facebook::api() in /home/zach/public_html/Majik/animated.php on line 10