facebook login with spring get name in korean -


facebook facebook = connection == null ? new facebooktemplate(accesstoken) : connection.getapi();

    useroperations useroperations = facebook.useroperations(); 

user facebookprofile = useroperations.getuserprofile();

    system.out.println(" locale >> " + facebookprofile.getlocale()); 

system.out.println(" name >> " + facebookprofile.getname());// want print in korea

locale >> ko_kr name >> yoon taeg sung

locale in locale result 'ko_kr' name in result 'yoon taeg sung'

where modify in source?

it resolved.

i use spring-social-facebook-2.0.4.jar.

add 'queryparameters.set("locale", localecontextholder.getlocale().tostring());' in 'facebooktemplate.class'

public pagedlist fetchconnections(string objectid, string connectiontype, class type, string[] fields) {

  multivaluemap queryparameters = new linkedmultivaluemap();    queryparameters.set("locale",localecontextholder.getlocale().tostring());  <--- code added.     if (fields.length > 0) {            string joinedfields = join(fields);       queryparameters.set("fields", joinedfields);        }       return 

fetchconnections(objectid, connectiontype, type, queryparameters); }


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -