0

I'm trying to fetch my player credits balance.

My server calls this URL: https://api.facebook.com/method/users.getStandardinfo?uids=XXX&fields=credit_balance&access_token=XXX&format=json

For my user and others, it works. But, for several users (who have FB credits), the response I get is: [] (an empty array). So, I don't get an error, but I also don't get any result...

Anyone know why?

Thanks, Roei

Roei
  • 319
  • 4
  • 15

1 Answers1

1

Per https://developers.facebook.com/docs/reference/rest/ the REST API is being deprecated. You should use the Graph API now. Please try with the new API and maybe your issue is fixed in it.

DMCS
  • 31,720
  • 14
  • 71
  • 104
  • Thanks! I didn't find any documentation of how to implement credits balance fetching using the Graph API... anyone knows how to do that? – Roei Jan 19 '12 at 07:06
  • See: http://developers.facebook.com/docs/credits/ As you can see in the first photo, the http://developers.facebook.com/docs/reference/dialogs/pay/ pay dialog already does it for you. Also see: http://developers.facebook.com/docs/credits/build/ – DMCS Jan 19 '12 at 13:45
  • Yes, it checks if the user has enough credits, but I need to retrieve the balance once in a while to display the balance IN MY APP/GAME FLASH, so I need to be able to query it regardless to the pay dialog – Roei Jan 22 '12 at 15:22
  • My guess is this new framework with the removal of gathering credit information for each user was done because it was getting abused. Your game shouldn't need to know that information anyhow if it is a well constructed game. – DMCS Jan 22 '12 at 18:50
  • Thanks for your reply. I didn't found any official Facebook mention about the removal of gathering the balance and the REST API hasn't deprecated yet. The thing is that gathering the balance works for some of the users and not for the others, and I still try to understand why is it... – Roei Feb 21 '12 at 09:30
  • I'm sorry, the rest API is being deprecated per this page (https://developers.facebook.com/docs/reference/rest). It is still available but it is unsure how long it will be available for since it's been officially deprecated. – DMCS Feb 21 '12 at 15:30