The facebook provides the method to get user's credit balance which is
$ret = $facebook->api_client->users_getStandardInfo($user_id, array('credit_balance')).
When I try to get balance Facebook return me the error:
"error_code": 13,
"error_msg": "The underlying FQL query made by this API call has encountered the following error: credit_balance is not a member of the user table."
Please tell me why and the correct way to get credit balance.
Thanks very much!
++++++++++++++++++++++++++++++++++++++++++++++++++++
I've run into this same problem today as well, making the call with the newer SDK instead:
try {
$data = $this->facebook->api(array('method' => 'users.getStandardInfo','uids' => 123456789 , 'fields' => 'credit_balance'));
error_log($data);
} catch (Exception $e) {
error_log('FACEBOOK EXCEPTION: '.$e);
}
Exception: 13: The underlying FQL query made by this API call has encountered the following error: credit_balance is not a member of the user table.
Same error if I try with users.getInfo
I'm very curious why Facebook would give out the example using the old SDK + API.
Does this error message have anything to do with the credits test status of my app or did facebook just give us the wrong FQL table to look in?
++++++++++++++++++++++++++++++++++++++++++++++++
This call is only available to apps that use Facebook Credits as their in game currency. If your game uses Facebook Credits as your in game currency, please submit an application for this and other features here:
https://www.facebook.com/help/contact_us.php?id=157379954315015
Thanks,
Sara
Facebook Platform Team
按照上面的意思是说: 要游戏的开发商去开通facebook积分币 为游戏的货币。
摘自:http://forum.developers.facebook.net/viewtopic.php?pid=361871