Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/indatawetrust/react-native-youtube-oauth
react-native interface to login to youtube (iOS)
https://github.com/indatawetrust/react-native-youtube-oauth
Last synced: about 1 month ago
JSON representation
react-native interface to login to youtube (iOS)
- Host: GitHub
- URL: https://github.com/indatawetrust/react-native-youtube-oauth
- Owner: indatawetrust
- Fork: true (watzak/react-native-instagram-oauth)
- Created: 2017-04-21T16:35:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-11T11:49:44.000Z (over 7 years ago)
- Last Synced: 2024-11-19T04:25:36.370Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 526 KB
- Stars: 11
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-react-native - react-native-youtube-oauth ★7 - react-native interface to login to youtube (iOS) (Components / Integrations)
- awesome-react-native - react-native-youtube-oauth ★7 - react-native interface to login to youtube (iOS) (Components / Integrations)
- awesome-react-native - react-native-youtube-oauth ★7 - react-native interface to login to youtube (iOS) (Components / Integrations)
- awesome-react-native - react-native-youtube-oauth ★7 - react-native interface to login to youtube (iOS) (Components / Integrations)
README
# react-native-youtube-oauth
react-native interface to login to youtube (iOS)
## Demo
http://i.imgur.com/PmF7V9d.gif## Getting started
1. `npm install react-native-youtube-oauth@latest --save`
2. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
3. Go to `node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj` ➜ and add `RCTLinking.xcodeproj`
4. In XCode, in the project navigator, select your project. Add `libRCTLinking.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
5. Click `RCTLinking.xcodeproj` in the project navigator and go the `Build Settings` tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for `Header Search Paths` and make sure it contains both `$(SRCROOT)/../../react-native/React` and `$(SRCROOT)/../../../React` - mark both as `recursive`.
6. Run your project (`Cmd+R`)
7. Register a new client on youtube itself => https://console.developers.google.com/apis/credentials/oauthclient?project=
![Alt Text](http://i.imgur.com/LeyB4zO.png)
8. https://github.com/luisfcofv/react-native-deep-linking#for-ios## Usage
```javascript
import RNYoutubeOAuth from 'react-native-youtube-oauth';const youtubeConfig = {
client_id: '',
redirect_url: ''
};RNYoutubeOAuth({
// app routing scheme. to be used for redirecting.
scheme: 'app://',
client_id: youtubeConfig.client_id,
redirect_uri: youtubeConfig.redirect_uri,
state: '0123456789',
},
code => {
});
```