Giter Site home page Giter Site logo

Comments (7)

hungdev avatar hungdev commented on May 31, 2024

@VolckaertAchiel
The redirectUrl must be the same with redirect URIs in tab Security https://www.instagram.com/developer/clients/
Please make sure that every props value are correct.
And final, please give me a video of bug.

from react-native-instagram-login.

VolckaertAchiel avatar VolckaertAchiel commented on May 31, 2024

@hungdev the code is correct, just onloginsucces isn't executed

from react-native-instagram-login.

hungdev avatar hungdev commented on May 31, 2024

@VolckaertAchiel
could you give me an example on https://snack.expo.io or a video about the bug?
I will check for you.

from react-native-instagram-login.

VolckaertAchiel avatar VolckaertAchiel commented on May 31, 2024

i'm not able to create a snack.

this is the only code in my component, it loads fine, i can login with a registered sandboxuser and it redirect to my url i defined. when it reaches that expect that i should get my token? it logs nothing, is not even executed, the log on close logs something but has no data, which is expected.

yes my client id is filled in

i kinda really need the token 😄

View>
<TouchableOpacity onPress={()=> this.instagramLogin.show()}>
<Text style={{color: 'black', margin: '20%'}}>Login

<InstagramLogin
ref= {ref => this.instagramLogin= ref}
responseType="token"
clientId=''
scopes={['public_content', 'follower_list']}
onLoginSuccess={(token) => console.log('token: '+token)}
onLoginFailure={(data) => console.log('error: '+data)}
onClose={(data) => console.log("close")}
redirectUrl="https://us-central1-scautapp.cloudfunctions.net/url_get&response_type=token"
/>

from react-native-instagram-login.

hungdev avatar hungdev commented on May 31, 2024

Could you give me a recorded video?

from react-native-instagram-login.

VolckaertAchiel avatar VolckaertAchiel commented on May 31, 2024

image

ezgif com-optimize

from react-native-instagram-login.

hungdev avatar hungdev commented on May 31, 2024

@VolckaertAchiel
I know what the reason is. Webview response has been changed.
On 1.1.0 version, you can fix this bug without reinstall lib by adding www in redirectUrl ( both redirectUrl props and https://www.instagram.com/developer/clients/
like this:

<Ins
          ref='ins'
          clientId=''
          redirectUrl='https://www.google.com'   // <=======like this
          scopes={['public_content+follower_list']}
          onLoginSuccess={(token) => this.setState({ token })}
          onLoginFailure={(data) => this.setState({ failure: data })}

<WebView/> is going to be removed from the React Native core. So I decided to use react-native-webview as react native team suggests.
I release 1.1.1 version. Please reinstall lib, and follow the instructions in the readme.
Feel free to reply if the issue still exists.
see more:
https://facebook.github.io/react-native/docs/webview
react-native-community/discussions-and-proposals#6

from react-native-instagram-login.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.