Skip to content

A Flutter plugin for authenticating users by using the native TwitterKit SDKs on Android & iOS.

License

Notifications You must be signed in to change notification settings

sabreys/flutter_twitter_login

 
 

Repository files navigation

Caution

flutter_twitter_login library is no longer supported by the owner. If you are getting "#import <TwitterKit/TwitterKit.h> not found error" check out the change i made or use "tw_login: ^1.1.4". This is the same package with fix.

flutter_twitter_login

pub package Build Status Coverage Status

A Flutter plugin for using the native TwitterKit SDKs on Android and iOS.

This plugin uses the new Gradle 4.1 and Android Studio 3.0 project setup.

Dart support

  • Dart 1: 1.0.x.
  • Dart 2: 1.1.0 and up.

Installation

See the installation instructions on pub. No platform-specific configuration is needed!

How do I use it?

Here's some sample code that should cover most of the cases. For full API reference, just see the source code. Everything is documented there.

var twitterLogin = new TwitterLogin(
  consumerKey: '<your consumer key>',
  consumerSecret: '<your consumer secret>',
);

final TwitterLoginResult result = await twitterLogin.authorize();

switch (result.status) {
  case TwitterLoginStatus.loggedIn:
    var session = result.session;
    _sendTokenAndSecretToServer(session.token, session.secret);
    break;
  case TwitterLoginStatus.cancelledByUser:
    _showCancelMessage();
    break;
  case TwitterLoginStatus.error:
    _showErrorMessage(result.error);
    break;
}

About

A Flutter plugin for authenticating users by using the native TwitterKit SDKs on Android & iOS.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 43.1%
  • Java 29.4%
  • Objective-C 16.1%
  • Ruby 11.4%