3

I have succesfully retrieved a language that a Facebook User knows using the Graph API

the JSON looks like the following.

languages =     (
    {
        id = 105541139480550;
        name = Indonesian;
    },
    {
        id = 106059522759137;
        name = English;
    },
    {
        id = 103088979730830;
        name = "Mandarin Chinese";
    }
);

Those are array of Page of that language.

For example:

http://facebook.com/pages/-/106059522759137 will redirect to the english language page

How do I get the language code from that from example "en" for english?

https://en.wikipedia.org/wiki/Language_code

Any help would be greatly appreciated!!!

JayVDiyk
  • 4,277
  • 22
  • 70
  • 135

1 Answers1

2

There's no endpoint to get the language codes of the languages object's entries. You can query the locale of the user object, but not for each language. I guess you'll need a mapping in your own application between the language on Facebook and the language code.

See

Tobi
  • 31,405
  • 8
  • 58
  • 90