views:

46

answers:

2

Hi,

I'm looking to do the 2 following tasks automatically via the twitter API?

  1. Allow a user to provide their credentials and have their twitter account to subscribe to my website feed directly from a form on the site.

  2. Allow a user to integrate tweets from my websites twitter feed into their outgoing tweets.

I'm finding it hard to find any informationon how to achieve these, can anyone shed any light?

Thanks in advance.

+1  A: 

For 1; take a look at; Twitter REST API Method: friendships create

A CURL example;

curl -u user:password -d "" http://api.twitter.com/1/friendships/create/dougw.xml

replate dougw with your Twitter username.

For number 2 take a look at; Twitter REST API Method: statuses/update

A CURL example;

curl -u user:password -d "status=playing with cURL and the Twitter API" http://api.twitter.com/1/statuses/update.xml
Adnan
Thanks, the first part makes sense with setting up the subscription.In the second example, I would always need to retain the user's username and password if I wanted their feed to include my tweets? Is there not subscription style option to set this up once? My client is ademant that this is possible but having investigated I'm not seeing how.
Brian Scott
A: 

You are describing some core twitter functionality.

  1. You want the user to follow you.

  2. You want the user to retweet all of your messages

There may be some issues with spamming for #2.

Jon Winstanley
Yes, I'm aware of what your saying. This is actually a client request that I'm having trouble getting the implementation information for. The client is expecting the user to temporarily volunteer their twitter username and passowrd to generate the twitter requests.
Brian Scott