Comments (13)
@muhammadsarim555 i have the same problem, have you found any solution?
from react-native-simple-twitter.
@mark-muhammad i did not find this solution
from react-native-simple-twitter.
Hi there!
I will check this, so please wait!
sorry.
FYI, please let me know your information.
- OS
- Device
- react-native-simpel-twitter version
- React Native version
from react-native-simple-twitter.
@watanabeyu WIndow 7 , expo sdk version 31 , device android LG
from react-native-simple-twitter.
Mine is slightly different
- OS: macOS 10.14
- Device: android 5.1.1
- react native: 31.0.0
- react-native-simple-twitter: 2.0.2
Also, I've found that in android, callback URL was not called.
from react-native-simple-twitter.
@mark-muhammad
I check it on below environment.
- OS: Android 7.0
- Device: HUAWEI P10 lite
- react-native-simpel-twitter version: 2.2.0
- React Native version(expo):v32
I can work fine.
Please check your environment working at this example.
from react-native-simple-twitter.
@watanabeyu I did follow the example but still didn't work. Do you think the version I used could be the problem? If I really should update the lib, what version do you think still compatible with react native v31? Because I once used v32 but got a problem which forced me to use v31 instead.
from react-native-simple-twitter.
@mark-muhammad
umm... My Android phone is work fine.
Could you show me the source code?
from react-native-simple-twitter.
@watanabeyu I just updated to v2.3.0 and still didn't work. Anyway, here is my code related to the login process. What made curious is that it worked fine in iOS.
onGetAccessToken = ({ oauth_token, oauth_token_secret }) => {
console.log("TOKEN_SET: " + oauth_token + " | " + oauth_token_secret)
}
onSuccess = (user) => {
console.log(user);
TwitterID = user.id;
Name = user.name;
Email = user.email;
this.loadAccessKeysViaTwtitter(TwitterID, Name, Email);
}
onClose = (e) => {
console.log("press close button")
}
onError = (err) => {
console.log(err)
}
<TWLoginButton
containerStyle={styles.loginContainer}
style={styles.loginButton}
textStyle={styles.loginButtonText}
onGetAccessToken={this.onGetAccessToken}
onSuccess={this.onSuccess}
closeTextStyle={styles.loginCloseText}
onClose={this.onClose}
onError={this.onError}>
<SocialIcon
title='TWITTER LOGIN'
button
iconSize={ 18 }
iconStyle={{ marginTop: -8, marginBottom: -8 }}
fontStyle={{ fontSize: 12 }}
style={{width: '90%', height: 40, borderRadius: 2, alignSelf: 'center'}}
type='twitter'
/>
</TWLoginButton>```
from react-native-simple-twitter.
@watanabeyu I recently found out that my callback was actually hit withquery string oauth_verifier
which you used to filter here
const match = webViewState.url.match(/\?oauth_token=.+&oauth_verifier=(.+)/);
But somehow, WebView
didn't read the URL, and since I have redirection in the callback, WebView
recognized only the redirected URL, ignoring callback URL. Do you think it is due to how WebView
in android handles redirection? Do you I should change the logic in the callback URL?
from react-native-simple-twitter.
@watanabeyu Never mind. I just resend the query string which twitter sent to my callback URL to the redirection inside my callback. In short, in my callback URL, I did this
redirect($url . $_SERVER['QUERY_STRING']);
It's probably just a workaround, but if WebView
in android only reads the redirected URL, I guess this is the way to go.
@muhammadsarim555 Could this happen to be your case too?
By the way, thank you for the good lib @watanabeyu
from react-native-simple-twitter.
@mark-muhammad i did not show the **web view. ** i was just unable to get token
from react-native-simple-twitter.
@mark-muhammad @muhammadsarim555
Sorry to be late to response.
I fixed webview bug, and update package v2.4.0
please use this version.
from react-native-simple-twitter.
Related Issues (15)
- callback url HOT 3
- Error 32 Could not authenticate you on account/verify_credentials.json HOT 3
- react-navigation reset not working in onSuccess HOT 5
- An example of logging user in HOT 1
- Not Redirect back to app HOT 1
- URL callback HOT 1
- Specify which twitter callback url HOT 1
- Make this generic? HOT 1
- Tried to register two views with the same name RNCWebView HOT 1
- consumer secret
- Error while /oauth/request_token
- Expo のバージョン 45 で TextInput に入力できない問題
- "Invalid hook call" error HOT 4
- onGetAccessToken never called HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-simple-twitter.