ericbae
ericbae

Reputation: 9644

Twitter oAuth : Updating authenticated user's status

I have a web site, that authenticates users using their Twitter ID and password via oAuth.

Everything works well.

I want to know if it's possible to post a status update to the user's Twitter page. I know how to post a status update to my website's Twitter account (which is what the wit web site is registered with), but how do I update someone else's status when they authenticate via my site?

Thank you.

Upvotes: 3

Views: 441

Answers (3)

sinemetu1
sinemetu1

Reputation: 1726

You need to authorize the token for the specific user that will receive the status update. One option is to follow the PIN-based OAuth method for sending updates to another user's status.

From the Implementation section:

The PIN-based flow is implemented in the same exact way as Implementing Sign in with Twitter and 3-legged Authorization, with the only difference being that the value for oauth_callback must be set to oob during the POST oauth / request_token call.

Once your application has obtained either a GET oauth/authenticate or GET oauth/authorize URL, display the URL to the user so that they may use a web browser to access Twitter.

When an oob callback is requested and the user visits Twitter, they will not be automatically redirected to the application upon approving access. Instead, they will see a PIN code, with instructions to return to the application and enter this value.

Your application must allow the user to input this PIN to complete the flow. The PIN code must be passed as the value for oauth_verifier for the POST oauth/access_token request. All other requests will work normally.

Upvotes: 1

Fionaa Miller
Fionaa Miller

Reputation: 511

Here is an example shows how to implement Twitter OAuth with .NET and attached sample code.

It describes user status update after authentication.

Upvotes: 1

Buhake Sindi
Buhake Sindi

Reputation: 89189

Have you checked the Twitter API Documentation? There's a status/update method.

Upvotes: 1

Related Questions