How do you access a user's languages using the Facebook GRAPH API? I don't see it anywhere in the permissions and I can't find it any other way. If a user lists that they speak Spanish or French, how can I find this?
You can get the languages from https://graph.facebook.com/me .
If you are looking for user locale as @chacham15 mentions then its from locale variable . See https://graph.facebook.com/harikt .
You can try http://developers.facebook.com/tools/explorer?method=GET&path=me and see it in action.
Update :
The permission user_likes
is need to access the languages array .
[languages] => Array
(
[0] => Array
(
[id] => 105692839465644
[name] => Malayalam
)
[1] => Array
(
[id] => 106059522759137
[name] => English
)
)
Hope this solves your issue.
What I do is to check the user locale and I assume that he speaks that language, for example:
$locale_f=$parsedJson->locale;
$lang1=explode("_",$locale_f);
if ($lang1[0]=="es") $lang1="espagnol";
if ($lang1[0]=="en") $lang1="anglais";
if ($lang1[0]=="it") $lang1="italien";
if ($lang1[0]=="pt") $lang1="portugais";
if ($lang1[0]=="fr") $lang1="francais";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With