Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Twitteroauth | 4,231 | 721 | 165 | 4 days ago | 38 | August 18, 2022 | 31 | mit | PHP | |
The most popular PHP library for use with the Twitter OAuth REST API. | ||||||||||
Tweetinvi | 960 | 227 | 19 | 3 months ago | 133 | April 03, 2021 | 227 | mit | C# | |
Tweetinvi, an intuitive Twitter C# library for the REST and Stream API. It supports .NET, .NETCore, UAP (Xamarin)... | ||||||||||
Twitterapi | 906 | 446 | 11 | 9 days ago | 120 | June 06, 2022 | Python | |||
Minimal python wrapper for Twitter's REST and Streaming APIs | ||||||||||
Directory Backbone Bootstrap | 472 | 8 years ago | 6 | JavaScript | ||||||
Employee Directory sample application built with Backbone.js and Twitter Bootstrap | ||||||||||
Twitter4s | 258 | 1 | 21 days ago | 17 | May 21, 2022 | 46 | apache-2.0 | Scala | ||
An asynchronous non-blocking Scala client for both the Twitter Rest and Streaming API | ||||||||||
Twitter V2 | 149 | a year ago | 20 | April 10, 2021 | 25 | mit | JavaScript | |||
An asynchronous client library for the Twitter REST and Streaming API's | ||||||||||
Twitter4r Core | 84 | 14 | 13 | 11 years ago | 17 | July 11, 2011 | 8 | mit | Ruby | |
Core library for Twitter4R, which provides Ruby bindings for the Twitter REST API | ||||||||||
Twivatar | 73 | 6 months ago | 2 | HTML | ||||||
Twitter RESTful avatar API | ||||||||||
Ng Twitter | 55 | 47 | 8 years ago | September 02, 2015 | 5 | JavaScript | ||||
AngularJS library for the Twitter REST Api | ||||||||||
Python Face Client | 49 | 5 years ago | 3 | September 25, 2011 | 3 | bsd-3-clause | Python | |||
face.com REST API Python client library. |
ngTwitter is an AngularJS Twitter REST API wrapper. The purpose of this library is to quickly and easily access all the Twitter API endpoints without having to worry about the request signing and signature.
You need to have a Twitter app and a valid OAuth token.
Add this repository as dependency:
$ bower install ng-twitter-api --save
This will add the dependency to your project and to the bower.json
file.
The JavaScript library must then be added to your index.html file found in your projects www directory:
<script src="../ng-twitter-api/dist/ng-twitter-api.min.js"></script>
Twitter requires HMAC-SHA1 signatures in their Oauth implementation. This project install jsSHA with bower so you only have to include the file:
<script src="../bower_components/jsSHA/src/sha1.js"></script>
Once added to your index.html file, you must inject the library into your app.js module. Make your app.js file look something like the following:
angular.module('starter', ['ngTwitter'])
Now ngTwitter is ready to use!
$cordovaOauth.twitter(clientId, clientSecret).then(function (succ) {
$twitterApi.configure(clientId, clientSecret, succ);
}, function(error) {
console.log(error);
});
For a complete Ionic integration guide also check out my Blogpost How To Easily Use The Twitter REST Api With AngularJS.
If you got your OAuth token differently, just make sure to configure ngTwitter before making any other calls like this:
$twitterApi.configure(clientId, clientSecret, oauthToken);
After configuring you can use all the endpoint wrapper. Each API call returns a promise. The success callback is the complete Twitter Rest response.
$twitterApi.getHomeTimeline({count: 5}).then(function(data) {
console.log(data);
}, function(error) {
console.log('err: ' + error);
});
The options object is optional on every request. Just check out the Twitter documentation what you want to send.
configure(string clientId, string clientSecret, object token);
getHomeTimeline(object options); // GET statuses/home_timeline
getMentionsTimeline(object options) // GET statuses/mentions_timeline
getUserTimeline(object options) // GET statuses/user_timeline
searchTweets(string keyword, object options); // GET search/tweets
postStatusUpdate(string statusText, object options); // POST statuses/update
getUserDetails(string user_id, object options); // GET users/show
getRequest(string full_twitter_api_url, object options); // GET custom url
postRequest(string full_twitter_api_url, object options); // POST custom url
All contributions must be made via the development
branch. This keeps the project more maintainable in terms of versioning as well as code control.
Message me on Twitter - @schlimmson
Follow my Blog Devdactic - https://devdactic.com