After the application has opened the browser to authenticate the user, it does not redirect back to the application.
I've unlocked the "lock callback url" settings in the twitter developer apps settings, and supplied these parameters to my manifest:
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="appName"
android:host="main"
/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
Then the method i used to sign in would be:
signInTwitter(){
var tokens= {
consumerKey: 'xxx',
consumerSecret: 'xxx,
};
callbackUrl = 'appName://main'
auth(tokens, callbackUrl)
.then((credentials) => {
console.log(credentials)
}).catch(console.error);
}
After the application has opened the browser to authenticate the user, it does not redirect back to the application.
I've unlocked the "lock callback url" settings in the twitter developer apps settings, and supplied these parameters to my manifest:
Then the method i used to sign in would be: