0.0.6 • Published 2 years ago

@usecocreate/sdk v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@usecocreate/sdk

This is the official npm package for the CoCreate SDK. It allows you to easily integrate with various social media platforms, like Twitter, to authenticate and manage user data. In this guide, we will show you how to install and use the @usecocreate/sdk package in your project.

Installation

To install the package, run the following command in your project directory:

npm install @usecocreate/sdk

Usage

To use the @usecocreate/sdk package, simply import the required functions and use them in your project. In the example below, we will demonstrate how to use the connectTwitterLink function to generate a link for connecting a user's Twitter Account.

import { twitter } from '@usecocreate/sdk';
import React from 'react';

function TwitterConnectButton() {
  const link = twitter.connectTwitterLink({
    clientId: '560d0d00-0f02-47e3-a1ae-c349bb46874e',
    redirectUrl: 'http://localhost:3000/twitter_redirect_test',
    userEmail: 'email@example.com',
    sessionVerifier: 'my_session_verifier',
  });

  return (
    <a href={link} target="_blank" rel="noopener noreferrer">
      Connect Twitter
    </a>
  );
}

export default TwitterConnectButton;

Usage with React Native

To use the @usecocreate/sdk package with React Native it is necessary to install and import shims before importing the @usecocreate/sdk package.

import 'react-native-get-random-values';
import '@ethersproject/shims';

import { twitter } from '@usecocreate/sdk';

Documentation

The full documentation can be found on our website.

0.0.3

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.6

2 years ago

0.0.2

2 years ago

0.0.1-0dea2af

2 years ago

0.0.1-87b1a9f

2 years ago

0.0.1-5cecdb1

2 years ago

0.0.1-a626c1d

2 years ago

0.0.1-c54b34e

2 years ago

0.0.1-0b11655

2 years ago

0.0.1-f242b7d

2 years ago

0.0.1-e3348bb

2 years ago