http - Facebook iCalendar files in wrong language -


my app supports synchronizing events downloading icalendar files. when attempting download icalendar files facebook, facebook server returns files in wrong language in cases.

as user, file seems download in language selected on facebook website (my "primary facebook language"). correct functionality.

for international users, doesn't seem case. many users have selected "english" primary language, getting localized language version of file anyways, based on location: e.g. user in india receives hindi version of file, user in israel receives hebrew version.

is there way override facebook's behavior send correct version of file? parameters http request modify attempt force facebook send particular language? there url parameter or subdomain might them send file in correct language?

the current code download icalendar file:

        urlstring = "https://www.facebook.com/ical/b.php?<user-auth-params>"         url url = new url(urlstring);         httpsurlconnection httpsurlconnection = (httpsurlconnection) url.openconnection();         inputstream in = new bufferedinputstream(httpsurlconnection.getinputstream());         string ical = "";         byte[] buffer = new byte[1024];         while (in.read(buffer, 0, 1024) > 0) {             ical += new string(buffer).replaceall("[^\\p{c}\\s]", "");         }         //log.v(tag, "stream: " + ical);         httpsurlconnection.disconnect(); 

by way, people interested in answer, facebook accepts query parameter "&locale=xx-xx" part of query string specify language , localization settings file.

specifying specific locale seems have solved issue.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -