How could Twitter know the source of TWRequest?

325 views Asked by At

I'm just curious. TWRequests use generic ACAccounts which are shared by all apps on iOS. Apps don't specify their own consumer_keys. So how could Twitter know which app a specific TWRequest come from?

2

There are 2 answers

11
nst On

Twitter can't tell which app a specific TWRequest comes from.

Accounts.framework embeds consumer_key and consumer_secret.

For Twitter, all requests just seem to be coming from iOS Twitter integration.

1
georgemp On

Query params adc=phone and application_id=your_iosapp_sig (i think) are added to each request url during the OAuth process. Twitter should be able to identify your app by the application_id

Once you build your TWRequest, you can see the url request by

NSLog(@"%@", request.signedURLRequest.URL.absoluteString);

This should reveal the above two params.