On iOS Fabric/TwitterSDK, can we use TWTRLoginMethod.SystemAccounts for requesting user’s email address?

ios
apps.twitter.com
fabric
oauth
twitterkit

#1

We want to do “twitter auth” and “requesting user’s email address” by using ios system twitter account.
This means using “TWTRLoginMethod.SystemAccounts”.

But accoding to the following document, we must use TWTRLoginMethod.WebBased.
https://docs.fabric.io/ios/twitter/request-user-email-address.html

Isn’t we able to using “TWTRLoginMethod.SystemAccounts”?

the following requests can get email.
(using whitelisted twitter application consumerKey)

1. Twitter.sharedInstance().logInWithMethods([.WebBased]) {}
2. Twitter.sharedInstance().logInWithMethods([.SystemAccount])

(1. or 2.)
let client = TWTRAPIClient.clientWithCurrentUser()
let request = client.URLRequestWithMethod("GET", 
  URL: "https://api.twitter.com/1.1/account/verify_credentials.json",
  parameters: ["include_email": "true", "skip_status": "true"],
  error: nil)
client.sendTwitterRequest(request) { response, data, connectionError in }

if we must not use “TWTRLoginMethod.SystemAccounts”, is there other way?

thank you your help.


#2

When using the SDK provided via Fabric, yes, the recommend approach is to use TWTRLoginMethodWebBased. You may try other methods, but they are not guaranteed to return the result you’re looking for.


#3

dear @bonnell
thank you for your response.

We have following 3 questions about “twitter auth” and “requesting user’s email address”.

  1. We think "using TWTRLoginMethod.SystemAccounts does not violate twitter regulation.
    Is this right?

  2. We think that the other way is using “iOS Accounts.Framework” for using iOS SystemAccounts without using FabricTwitterSDK.
    But we see FabricTwitterSDK is using “Accounts.Framework”.
    Is “iOS Accounts.Framework” not guaranteed to return the result we are looking for too?

  3. Why is using TWTRLoginMethod.SystemAccounts not guaranteed on FabricTwitterSDK?
    (Are there already known issues with this method?)

thank you.