mcan
mcan

Reputation: 2082

Getting User Likes Count

I want to get user's friend's total page like counts

When i apply fql sentence which is below it results nice on fql explorer.

SELECT 
  uid, 
  name, 
  likes_count 
FROM user 
WHERE uid IN (SELECT 
                uid1, 
                uid2 
              FROM friend 
              WHERE uid1=me())

nice result
But, when i do the same thing with php it doesn't show likes_counts.
php code:

$fql= 'SELECT uid, name, likes_count FROM user WHERE uid IN (SELECT uid1, uid2 FROM friend WHERE uid1=me())';
$ret_obj = $facebook->api(array(
        'method' => 'fql.query',
        'query' => $fql,
        'access_token'=> ''.$fbme[access_token].''
)); 
print_r($ret_obj); 

php result:

enter image description here

How can i show like_counts?

Upvotes: 2

Views: 292

Answers (1)

onon15
onon15

Reputation: 3630

Most likely, the permissions you have in fql explorer are not similar to those you requested when setting up the FB session in your PHP.

Upvotes: 1

Related Questions