views:

30

answers:

1

Hi, all! I'm developing an application in which I need to include an option "Share on Twitter " click upon which the application's itunes address is automatically twitted to the user's Twitter account(ofcourse I'm accepting user's id and password). I was able to do that.

Now I want to add a button "Follow" click upon which will enable user to follow the application owner's twitter account automatically.

Anybody having idea how to accomplish this? Thanx in advance.

A: 

You need to call the friendships/create method with the ID or username of the person you want to follow. The authentication etc should be the same as you're using to update their status.

Chris Smith
Thank you so much Chris Smith. This' exactly what I was looking for... Can you please post how do you get this user id, also if I want to pass user's screen name, then how do I do that(Do I need any extension to add to this name?).
neha
Also one more question, this' just a url, so we are not mentioning the follower anywhere, like you are not calling it using the follower object, then how does Twitter handle this... making out who is the follower?
neha
You can pass the user/screen name in place of the user ID. I'm not sure what you mean about follower objects - if you're using a library to handle the communication with Twitter instead of using the API directly yourself, you'll need to check the library's documentation (or update the question to make it clearer what you need!)
Chris Smith