Reputation: 512
Hi i am wasting around two days with it.
can we really, post update to twitter with oAuth Token , secret just like facebook access_tocken?
i will save access_token to database and will use it later to post update.
But when i try with twitter it doesn't work can any one help me with it.
Upvotes: 1
Views: 689
Reputation: 4940
To post to Twitter via OAuth, there are FOUR tokens that you need.
Tokens 1 and 2 are probably hardcoded into your application (this is a security problem, but there are not many easy ways around this because of Twitter's implementation of OAuth).
Tokens 3 and 4 are given to you when your user authorizes you application to use his account. When you application gets them, you should put them into some sort of data store (cookies, database, whatever) so that they can be retrieved the next time your user wants to post to Twitter.
All four tokens are used each time a request is sent to Twitter.
I strongly advise you to consider using an existing library if one is available to you. The OAuth problem has been solved over and over again for just about every development platform. This is a wheel that does not need reinventing.
Upvotes: 4