user2160696
user2160696

Reputation: 709

Facebook JSON locale

Good day.

I make a request to facebook API to retrieve friend list.

https://graph.facebook.com/me/friends/?access_token=CAAB03LXvJxgBAFZCwCnZBIgk...MMAZD&locale=en_UK

And i got a response JSON with my friends but those friends who has cyrillic characters in their names look like this

{
         "name": "\u0410\u043d\u043d\u0430 \u042f\u043a\u043e\u0432\u043b\u0435\u0432\u0430",
         "id": "100000762004565"
}

So i tried change locale to ru_RU, but it didn`t help, furthermore ru_RU changes some english names to that weird bytecode.

Please help me retrieve cyrillic names. Thx;

Upvotes: 0

Views: 192

Answers (1)

thepoosh
thepoosh

Reputation: 12587

what you have there is a String created of a bunch of unicode characters. printing them will preduce "Анна Яковлева".

if you want to get this as cyrillic names you need to parse them as such.
try reading this answer for more information about parsing unicode in Java.

Upvotes: 2

Related Questions