How to create an app in the user's account during the first request


#1

How do applications like many mobile Twitter clients achieve that the application is permanently created in the user’s account, so that I can create a static access_token there? Normally this occures the first time the application tries to connect to Twitter.

The creation of an app on the Twitter website requires a developer account while the way I mean is done under the normal Twitter account which is also used to make normal postings in the timeline.

I looked into the API documentation but was not very successful. How is this made?


#2

As a developer, you need to create an app on dev.twitter.com and use the credentials there to set up your OAuth implementation.

The users of your app will go through the OAuth flow and authorize your app to access their account. At this point, your app will appear on those users’ twitter.com settings page.

For information about the OAuth flow, see https://dev.twitter.com/docs/auth/oauth-landing


#3

Yeah, but I have no interactive users sitting before my application. I don’t even have a browser where my application runs. I can’t let any real person do this interactive authentication step. This is just a wrong way.

I told the support all these things twice. But the support denied my application to use xAuth and told me instead to use this single user method having static tokens for my application. I’m almost sure they didn’t even understand what I was talking about. Perhaps it is hard to imagine that there are applications running without a user, completely automatic.

I want to have username and password in a configuration file. This is the only information the Twitter user has if he just created his Twitter account. And it is reasonable for an administrator to put these strings into a configuration file my automatic application can use from this moment on. So I thought I could and should automize the registration of my application in the user’s account.

I saw mobile Twitter clients registering themselves in the user’s account. How is this done? And which way are the tokens transfered to the client?


#4

Maybe it would help if you described what you were trying to build.

There are few reasons anyone would need xAuth. If you only need to make requests on behalf of one account, use the access token provided for your account on dev.twitter.com. If you wish to distribute your app and let your users configure it, then use OAuth and have it guide the end user through the auth flow.

A successful auth flow will wind up showing the application in the user’s twitter.com settings.


#5

I guess there’s a gap in understanding some terms. Twitter speaks from the single user and single user applications. Yes, my application is a single user application. It does something with the data of a single Twitter user’s account. But I have MANY single users. And I cannot administrate them in a single step, they are worldwide. So they have to administrate the application and the accounts themselves.

Creating a Twitter account is mandatory and I guess they will manage this surely themselves. Installing my application is also a step they must manage without any discussion. But registering my application in their Twitter user’s accounts is another and a somehow unusual topic. (Where else is such a step needed?) And really counterproductive is that this registration needs without any fail an interactive user participation. Applications like Windows Services or Linux daemons CANNOT interact with somebody. They have no user interface at all! They need to run automatic or they just fail.

So, if I cannot my program let register himself during an interactive OAuth process - how else can the external application be registered? By the user in his account? Good idea. At the moment a user can only register an application if he registered himself earlier as a Twitter developer. Which user will do this? A normal Twitter user cannot - as far as I know he just has no button in his account, nowhere. This is a missing feature! So running OAuth remains the only serious way to register an application.

I see two solutions at the moment:

  1. create a fake web application, a silly but interactive PHP thing, just to register the real application in the user’s account and transfer the keys to the client side, then run the none interactive application using these keys
  2. perform a real OAuth procedure in the application, but catch the register application web page in background (don’t open a browser) and fake the interactive button pressing - this means “emulate” a real person, just say “Yes”, I’m not sure if this could be programmed, this requires some experiments

#6

Your application should perform the OOB OAuth flow. Upon installation/configuration (the step where you’d prefer to have the user input their username and password) your application should prompt the user to visit an URL where they will see a PIN code they can input into your app. Completing the flow with this PIN code will configure your application to use that user’s Twitter account (and the app will show up in their settings page).

This flow is documented here: https://dev.twitter.com/docs/auth/pin-based-authorization


#7

I am trying to create an application for my account, but I could not find where to create any application. Could anyone tell me how?


#8

Use https://dev.twitter.com/apps to create an application record.


#9

hi


#10

I wish you a nice day


#11

hi
i have created app on twiiiter but i cant able acces my app in php . is anybody knows how to register with twitter on website.

thanks


#12

i dont know to give valid url format…


#13

When a user authorizes the app wouldn’t it be tedious to include the PIN code. Imagine doing this everything a different users authorizes the app. What we usually see if when a user authorizes the app he is landed to the app web page and the app is listed in his settings page. How do I achieve that?


#14

@rasika_yadav check this


#15

Hi
I have a similar requirements.

  • Create a app to tweet on behalf of user.
  • This auto tweet option should work with one time authentication to a user.
  • This app i would be using to create my own customized and common share/tweet to multiple social network sites.

please do provide suggestions regarding this.

Thanks