Using this solution I am getting the error: {"error":"unsupported_grant_type","error_description":"grant type not supported"}. Googling this returns virtually always the result that the content-type should be set to "application/x-www-form-urlencoded". You clearly do that in
"..
InitHttpRequest(req, accessToken);
req.ContentType = (!isObject ? "application/x-www-form-urlencoded" : req.Accept)
+ ";charset=" + Encoding.UTF8.WebName;
.."
so what am I missing here?