-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Meteor Accounts Twitter Auth code here... #6
Comments
ps. in native code call something like (React Native Example):
|
You rock @faceyspacey! Thanks for sharing this. What are you using in React Native to handle the authorization process? |
I'm not familiar with the Twitter OAuth process but should |
@spencercarli unlike Facebook, you get both an access token and an access token secret after the authentication process. Neither are app specific, but user specific. I used: https://github.com/GoldenOwlAsia/react-native-twitter-signin
So basically most the auth dirty work is done by the Fabric TwitterKit library, and we're left with making a simple request using your |
Here's a gist of the code:
https://gist.github.com/faceyspacey/9cdaee9b041fbe55868ad686a13ef3a4
@spencercarli you're code (e.g that you're using for Facebook auth) is using Meteor 1.3+ code with imports, whereas my code is for a Meteor 1.2 app or I'd make it similarly. Regardless, I figured I'd put up here for anyone to use if they need it, as I don't really have time to make it a proper package for Meteor 1.2 or 1.3. The code is written in the same style as:
https://github.com/spencercarli/react-native-meteor-accounts/blob/master/MeteorApp/server/imports/oauth-facebook.js
It should be easy for anyone to repurpose for their native twitter auth needs, or to simply incorporate into this package. cheers.
The text was updated successfully, but these errors were encountered: