It's actually very simple.

1. Download Abraham's TwitterOAuth from

2. Get API keys from

3. Open a new .php file, include and initialize TwitterOAuth:
$connection = new TwitterOAuth('consumer key', 'consumer secret', 'user key', 'user secret');
You can find these keys and secrets at

4. Send the tweet. Not sure, probably something with $connection->post();


On 12/11/10 10:56 PM, Jason Rennie wrote:
Hi everybody,

Hopefully this question hasn't been asked a million times already and
I was just searching for it badly, but here goes.

I played around with the twitter API back in basic authentication
days, and I was asked by a friend to put something together for him.
In the old days it would have been straight forward enough, but i'm
very confused about doing it with the oAuth mechanism.

Basically what is wanted is a form on a web page that will allow an
anonymous user to enter some text and then have that short text turned
into a tweet on twitter on one particular twitter account.

The text will be checked and massaged first to remove things like
URL's, rejected if there are black listed words etc.

It is intended as a "send prayer request" button for the twitter
account @worldprayr so that people can post prayer requests from the
blog page of the site.

With the old twitter API, authentication wise this would be straight
forward. The username and password would end up in the php file for
the script and used as needed. With the new oAuth stuff however I am
totally lost. All of the guides seem to talk about going through the
"allow an account to access your twitter feed" box and things like
that. However, I don't need any of that.

I really just need to get the authentication tokens setup once, set
those in the php script and away we go.

But I can't for the life of me figure out how to do this.

Thanks for any help you can offer, I am dreadfully confused.


Twitter developer documentation and resources:
API updates via Twitter:
Issues/Enhancements Tracker:
Change your membership to this group:

Reply via email to