react-native-youtube-oauth
v0.0.4
Published
react-native youtube login
Downloads
12
Readme
react-native-youtube-oauth
react-native interface to login to youtube (iOS)
Getting started
npm install react-native-youtube-oauth@latest --save
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj
➜ and addRCTLinking.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRCTLinking.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Click
RCTLinking.xcodeproj
in the project navigator and go theBuild Settings
tab. Make sure 'All' is toggled on (instead of 'Basic'). Look forHeader Search Paths
and make sure it contains both$(SRCROOT)/../../react-native/React
and$(SRCROOT)/../../../React
- mark both asrecursive
. - Run your project (
Cmd+R
) - Register a new client on youtube itself => https://console.developers.google.com/apis/credentials/oauthclient?project=
Usage
import RNYoutubeOAuth from 'react-native-youtube-oauth';
const youtubeConfig = {
client_id: '<YOUR CLIENT ID>',
redirect_url: '<YOUR REDIRECT URL>'
};
RNYoutubeOAuth(youtubeConfig, (err) => {
});