user1637579
user1637579

Reputation:

Preferred Currency API returning only ID

I'm currently trying to implement the preferred currency API, but all the graph API is returning to me is the user ID.

I go to the following link:

https://graph.facebook.com/100001342672661?fields=currency&access_token=XXXX

I get this back:

{ "id": "100001342672661" }

I've looked in the graph API explorer and get the same result. There are no errors, and "currency" appears to be a valid field, it's just not returning anything. Any ideas as to why this is happening?

Upvotes: 1

Views: 835

Answers (2)

Gabriel
Gabriel

Reputation: 1652

The FacebookId and the user access_token are not matching, this is why you're getting only the FacebookId as an answer.

  1. Allow the app on your developer account
  2. Get a user token for your app: https://developers.facebook.com/tools/access_token/
  3. Go to https://graph.facebook.com/me?fields=currency&access_token=XXX (XXX being the user token you just retrieved)

Upvotes: 2

Robyflc
Robyflc

Reputation: 1209

Currency is indeed a valid field. Are you sure it is set? For me it seems it isn't (and that's why it only returns you the id) but I'll look to find out it if there's any bug related to it.

Upvotes: 0

Related Questions