Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Twitter OAuth for automatic status update

Tags:

php

oauth

twitter

I want my website to automatically post status updates to a particular twitter account using OAuth in PHP.

I test this using a URL

www.mysite.com/update_status

but it asks me for "user name" and "password", which is fine when I am testing it. But my website will not be able to insert this user name and password before posting the status update.

So the question is how can a website which is in the server, automatically post a status update to an account without user filling out the user name and password.

Is there any way to bypass this? I tried saving oAuth tokens, but it's not working.

Thank you for your answer in advance!

like image 751
ericbae Avatar asked Apr 29 '10 01:04

ericbae


1 Answers

My recommendation:

1) Use a PHP library like http://github.com/abraham/twitteroauth.

2) Select your app on http://dev.twitter.com/apps and click on "My Access Token".

3) Us that access token as described on http://dev.twitter.com/pages/oauth_single_token.

like image 83
abraham Avatar answered Oct 16 '22 01:10

abraham