Hello,
I have a Flutter app that I’m working on currently with a NodeJS backend and I’ve run into a problem with the Twitter API. I want my user to be able to login with Twitter through my app so I generate a link with Twitter’s API that is supposed to open them a Twitter page which let’s them login. Problem is, when using launchUrl, it tries to open the native twitter app on mobile but apparently fails to do so and almost instantly closes the app again. I’ve tried opening the link on a browser on the desktop and that does work (example link (replaced the client id) :https:// twitter. com/i/oauth2/authorize?client_id=client_id&code_challenge=challenge&code_challenge_method=plain&redirect_uri=https%3A%2F%2Fwww. thesocialrace .com%2F%3Fsocial%3Dtwitter&response_type=code&scope=users.read&state=twitter-inscreaser-state).
The redirect_uri is supposed to open my app when on mobile since I setup a deeplink (this works perfectly fine with Facebook), but it seems Twitter has a problem opening it ? We’re using https ://www. thesocialrace .com/?social=twitter as redirect_uri, but I’ve read something about needing a custom scheme for deep linking ?
Has anyone had similar problems or knows the solution ? Would appreciate it a lot, been on this for more than 5 hours at this point.
(sorry for the spaces in the links, the forum won’t let me post them)