Search code examples
iostwitter

login with twitter callback url error


I want to login to app with twitter, i follow this documentation but i got this error

[TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings" UserInfo={NSLocalizedDescription=Callback URL not approved for this client application. Approved callback URLs can be adjusted in your application settings} error: Optional("Request failed: forbidden (403)")

i found this answer in twitter developer documentation

If you do receive this error message, please check the URL that you are using with the callback_url parameter in your oauth/request_token call and make sure that this URL has been whitelisted in your app settings on apps.twitter.com.

and this is the link

but i don't understand that, i don't know what to do any help please ?


Solution

  • 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://