1

I´m trying to programming this example for OAuth in C# for the xing api: OAuth with Verification in .NET

I get always the error message when i try to get my own user-informations:

Invalid OAuth signature

Anyone ideas?

Thx

Dennis

Community
  • 1
  • 1
Dennis
  • 11
  • 2

1 Answers1

2

A few years too late, but I've encountered and solved the issue, so if any one comes back to here: In GetSignatureBase in the Manager class, you need to change

if (!string.IsNullOrEmpty(this._params[p1.Key]) &&
     !p1.Key.EndsWith("_secret") &&
     !p1.Key.EndsWith("signature"))
    p.Add("oauth_" + p1.Key, p1.Value); 

to uri encode the value the same way it's encoded in the building of the request:

if (!string.IsNullOrEmpty(this._params[p1.Key]) &&
     !p1.Key.EndsWith("_secret") &&
     !p1.Key.EndsWith("signature"))
    p.Add("oauth_" + p1.Key, UrlEncode(p1.Value)); 
Barak Hirsch
  • 127
  • 8