I posted the above on the Twitter Developers Group. Is there anyone here that knows the Twitter API pretty good? Any feedback would be much appreciated.Hello, I am developing a website (a.com) that will allow people to connect their existing account (on a.com) to their Twitter account. My site will use the Twitter API to scan peoples twitter friends looking for friends already on my site (a.com) and some status updates will occur. I am writing this in PHP.
What I am struggling with, is how I can save a users twitter information so the user doesn't have to be logged into Twitter.com each time my site needs to post a status update.
Like for example, Yelp.com I authorized Yelp.com to post to me feed, now when I rate a business, I can post that review to Twitter regardless of if they are logged into Twitter.com.
Or, like foursquare, when I checkin, I can tweet that checkin and it will show up on my feed whether I am logged into Twitter.com or not.
Are these sites saving my actual login credentials, or is there a way to save the oauth tokens in a database and just present them to the API when I need to post a tweet or get a list of that users twitter friends?
I hope this makes sense.
Twitter oAuth Troubles
Moderator: General Moderators
Twitter oAuth Troubles
-
cpetercarter
- Forum Contributor
- Posts: 474
- Joined: Sat Jul 25, 2009 2:00 am
Re: Twitter oAuth Troubles
With Twitter/oAuth :
- you register your application with Twitter
- you store the consumer key and the consumer secret which Twitter gives you
- you store the Twitter authorisation token for each user to whose stream you want to post.
You never see the user's login details (ie their username and password). That is the whole point of oAuth.
The Twitter documentation is quite good once you get your head round the basic concepts = certainly a lot easier than the Facebook equivalent.
- you register your application with Twitter
- you store the consumer key and the consumer secret which Twitter gives you
- you store the Twitter authorisation token for each user to whose stream you want to post.
You never see the user's login details (ie their username and password). That is the whole point of oAuth.
The Twitter documentation is quite good once you get your head round the basic concepts = certainly a lot easier than the Facebook equivalent.