Swift4: Callback Url Not Approved for This Client Application

Callback url not approved despite being provided Twitter Api

I face same issue we no need to change in code side, we just need to change some setting in developer account of twitter (tested solution)

You need to add the consumer/api key in Callback URL using below format

Ref link : https://developer.twitter.com/en/docs/basics/callback_url.html

twitterkit-consumer/api key://

Sample Image

You need to add twitterkit-yourConsumerKey in info.plist

<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-your Consumer Key (API Key)</string>
</array>
</dict>
</array>

Callback URL not approved for this client application

Just add twittersdk:// as one callback URL on your twitter app setting
https://apps.twitter.com/ and it will work as a magic

login with twitter callback url error

I solved it, I set Callback URL in that format twitterkit-{api key}:// suppose api key is 1234 then the Callback URL should be twitterkit-1234://

Callback URL not approved by Twitter

Twitter recently (in May 2018) enforced that sign-in-with-Twitter users must whitelist callback URLs for security reasons (see the announcement).

This means callback URLs have to be explicitly and identically set up for all supported third-party applications. You can setup the callback URLs in your Twitter's application setup page: https://apps.twitter.com

For example, if your callback URL is http://localhost:8080/myApp/signin/twitter, you must add it to the list of Callback URLs in your Twitter's application setup page exactly as it is: http://localhost:8080/myApp/signin/twitter

Sample Image

See also the documentation on Twitter callback URLs.



Related Topics



Leave a reply



Submit