Hi,
I’m trying to use oauth to update messages on my account.
Everything looks good until I insert some non alphabetical characters in my message (ex. € à ì ù è… i think also character I must not use).
In these cases I obtain the message
{“errors”:[{“message”:“Could not authenticate you”,“code”:32}]}
I encode the message (status) with this function obtained googling:
public String percentEncode(String string) {
if (string == null) {
return "";
}
try {
return URLEncoder.encode(string, "UTF-8")
.replace("+", "%20").replace("*", "%2A")
.replace("%7E", "~");
} catch (UnsupportedEncodingException wow) {
throw new RuntimeException(wow.getMessage(), wow);
}
}
must I insert other characters in my function?
Where can I find a reference?
Simone Buzzi