1

There's plenty of code out there that lets you get a user's twitter account. Here's a paste from some code from our app:

ACAccountStore *accountStore = [ACAccountStore new];
ACAccountType *socialMediaAccountType =  [accountStore accountTypeWithAccountTypeIdentifier:accountType];
[accountStore requestAccessToAccountsWithType:socialMediaAccountType options:accountOptions completion:...

The problem is that it is possible to have a twitter account on the phone that is misconfigured, the password is missing or incorrect.

How can I tell? I'm' especially interested in the "Missing password" case since that is a common use case. (Buy a new phone, restore from iTunes backup, launch twitter, give it your password again. You now have an account in Settings that doesn't have a password.)

You would think that the credentials property would help out with the missing password case. But no, according to Apple's docs:

This property is required and must be set before the account is saved. For privacy reasons, this property is inaccessible after the account is saved.

Paul Cezanne
  • 8,629
  • 7
  • 59
  • 90

0 Answers0