Twitter Kit email request with TWTRShareEmailViewController

ios

#1

Hello guys !

I’m trying to integrate Fabric in my app and more particularly request the user email adress with the TWTRShareEmailViewController view controller. To do that, I sent a request to Twitter via apps.twitter.com and my app has been whitelisted.

Then, they told me that my both keys (fabric, webapp) have the email requesting and Fabric permissions. One thing to know is webapp keys and Fabric keys are completely different.

So, I tried to request the email with the keys from the webapp and I get this :

TwitterAPIErrorDomain Code=32 "Request failed: unauthorized (401)\" UserInfo=0x170e7d1c0 {NSErrorFailingURLKey=https://api.twitter.com/1.1/account/verify_credentials.json?skip_status=true&include_email=true, NSLocalizedDescription=Request failed: unauthorized (401), NSLocalizedFailureReason=Twitter API error : Could not authenticate you. (code 32)}

When I try to request with the Fabric key I get this :

Error Domain=TwitterAPIErrorDomain Code=37 "Your application may not have access to email addresses or the user may not have an email address.

Anyone know which keys I’m suppose to use or know how to fix this?


#2

I’m having the same problem. The permission box is checked in my app settings at apps.twitter.com, and I received an email from Support saying it was turned on, but still I get the error.


#3

Hey @Genius,

I know Todd is working with you on this over our email support. Stay tuned.

-Mike


#4

I am experiencing the exact same issue. Has this been resolved for you @Genius?


#5

The Fabric team helped us resolve the issue. Our app’s info.plist had the incorrect consumer key. When you set up Fabric for the first time, it will put a consumer key in your info.plist. When you set up TwitterKit, you need to replace that key with your Twitter app’s consumer key. That solved the problem for us. Thanks


#6

Thanks @Genius! That resolved my issue.


#7

thanks for saving my time :slight_smile:


#8