From 9fc50a5215416c05bc5f7f5a419d2b541225ed0e Mon Sep 17 00:00:00 2001 From: kwainright Date: Thu, 9 Apr 2020 17:50:51 -0400 Subject: [PATCH] Twitter - Api half way there - committing to check out other branch --- lib/twitter_assets/twitterFeed.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/twitter_assets/twitterFeed.dart b/lib/twitter_assets/twitterFeed.dart index e0cab00..9199593 100644 --- a/lib/twitter_assets/twitterFeed.dart +++ b/lib/twitter_assets/twitterFeed.dart @@ -14,9 +14,14 @@ class TwitterFeedCreation { static final apiKey = 'AFBfOqx8uXIUBZMxAFoQyO3zA'; static final apiSecret = '48Gp7nczz9SqExorwYuWpA6Nmviuox6Beq83kjH1XtYtunorym'; + getToken() async { + http.Response response = await http.get('https://api.twitter.com/oauth2/token',); +} + Future> getPage({int size = 10}) async { var url = '$twitterBase/tweets.json?q=from%3ACharlotteFTBL&result_type=mixed&count=$size'; - http.Response response = await http.get(url + http.Response response = await http.get(url, + headers: {} ); Iterable tweets = json.decode(response.body); return tweets.map((e) => Tweet.fromJson(e)).toList();