On 8/13/10 2:46 AM, Stan Miasnikov wrote:
> Hi,
>
> I have implemented the oauth for a desktop application. The
> application has been approved and I get the token back and also can
> make HTTP requests using the token. However, when I post an update
> using the app, it shows "...via API" instead of the application name.
> I thought the approved application's name suppose to appear instead. I
> made sure that the post has oauth header instead of basic auth.
> header. Do I need to do something else to ensure that the app name
> appears instead of the API?
>
> POST header:
>
> Twitter request header: {
> Authorization = "OAuth realm=\"\", oauth_consumer_key=\"XXXX\",
> oauth_token=\"XXXXX\", oauth_signature_method=\"HMAC-SHA1\",
> oauth_signature=\"lAx4jFI%2FeXaFv4aBxEYg2n3kkSo%3D\", oauth_timestamp=
> \"1281566038\", oauth_nonce=\"F0999B0E-66FC-4CFE-AED7-4D87064A92A9\",
> oauth_version=\"1.0\"";
> "Content-Type" = "application/x-www-form-urlencoded";
> "X-Twitter-Client" = WritePad;
> "X-Twitter-Client-Url" = "http://www.phatware.com/writepad";
> "X-Twitter-Client-Version" = "4.1";
> }
>
> Thanks,
>
> Stan
Hi Stan,
As far as I know, all registered OAuth applications show "via
Application" - no exceptions. If you get "via API", then make sure that
you are not also sending basic credentials. Your application may be
caching credentials, which could be the issue.
Also, I don't think that you should send the X-Twitter headers. As far
as I know, Twitter prefers having these in your user agent.
Tom