twitter_1user 1.0.1 copy "twitter_1user: ^1.0.1" to clipboard
twitter_1user: ^1.0.1 copied to clipboard

Connect to Twitter API with OAuth1.0a. The access token is assumed to be obtained from the Twitter application details page. It is therefore ideal for single user applications.

example/example.dart

import 'dart:io' show Platform;
import 'dart:convert';
import 'package:twitter_1user/twitter_1user.dart';

Future<void> main(List<String> arguments) async {
  Map<String, String> env = Platform.environment;
  Twitter twitter = new Twitter(env['API_KEY'], env['API_SECRET'],
      env['ACCESS_TOKEN'], env['ACCESS_SECRET']);

  String response = await twitter
      .request('GET', 'statuses/user_timeline.json', {'trim_user': 'true'});
  var tweets = jsonDecode(response);
  print(tweets[1]['text']);

  response = await twitter
      .request('post', "statuses/update.json", {'status': 'Hello, ワールド!'});
  print(response);
}
1
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Connect to Twitter API with OAuth1.0a. The access token is assumed to be obtained from the Twitter application details page. It is therefore ideal for single user applications.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

convert, crypto

More

Packages that depend on twitter_1user