All Projects → abraham → twitter-status

abraham / twitter-status

Licence: MIT license
Twitter Status Web Component

Programming Languages

typescript
32286 projects
HTML
75241 projects

Projects that are alternatives of or similar to twitter-status

Twitter Python Ads Sdk
A Twitter supported and maintained Ads API SDK for Python.
Stars: ✭ 114 (+93.22%)
Mutual labels:  twitter-api
Albert
这个是我个人网站的项目,欢迎贡献代码,力求能够应用到实际工作中java相关的大多数技术栈。有兴趣请Star一下,非常感谢。qq交流群:587577705 这个项目将不断地更新!生产环境:
Stars: ✭ 168 (+184.75%)
Mutual labels:  twitter-api
100daysofcode Twitter Bot
Twitter bot for #100DaysOfCode
Stars: ✭ 214 (+262.71%)
Mutual labels:  twitter-api
Twitwork
Monitor twitter stream
Stars: ✭ 133 (+125.42%)
Mutual labels:  twitter-api
Twitter Api Php
The simplest PHP Wrapper for Twitter API v1.1 calls
Stars: ✭ 1,808 (+2964.41%)
Mutual labels:  twitter-api
Twitter Bot
Node js twitter bot to send auto welcome message for your new followers
Stars: ✭ 184 (+211.86%)
Mutual labels:  twitter-api
Twitterbot
Several PHP scripts for making Twitter bots that retweet certain terms, or post from a data source (rss, database, markov body, picture folder).
Stars: ✭ 106 (+79.66%)
Mutual labels:  twitter-api
Egg Mode
a twitter api crate for rust
Stars: ✭ 249 (+322.03%)
Mutual labels:  twitter-api
Midare
🕒 ツイートを使って生活習慣の乱れを可視化するWebアプリ
Stars: ✭ 153 (+159.32%)
Mutual labels:  twitter-api
Tweetledee
A PHP library that provides an incredibly easy way to access Twitter data as JSON or RSS feed by URL or standard CLI syntax.
Stars: ✭ 208 (+252.54%)
Mutual labels:  twitter-api
Cancel Culture
Tools for fighting abuse on Twitter
Stars: ✭ 136 (+130.51%)
Mutual labels:  twitter-api
Csscreatures
Make a creature by tweeting to @csscreatures
Stars: ✭ 144 (+144.07%)
Mutual labels:  twitter-api
Twitter To Sqlite
Save data from Twitter to a SQLite database
Stars: ✭ 203 (+244.07%)
Mutual labels:  twitter-api
Twurl
OAuth-enabled curl for the Twitter API
Stars: ✭ 1,648 (+2693.22%)
Mutual labels:  twitter-api
Harpy
A Twitter app built with Flutter
Stars: ✭ 211 (+257.63%)
Mutual labels:  twitter-api
Awesome Twitter Tools
A curated list of awesome twitter tools
Stars: ✭ 113 (+91.53%)
Mutual labels:  twitter-api
Bigdata Playground
A complete example of a big data application using : Kubernetes (kops/aws), Apache Spark SQL/Streaming/MLib, Apache Flink, Scala, Python, Apache Kafka, Apache Hbase, Apache Parquet, Apache Avro, Apache Storm, Twitter Api, MongoDB, NodeJS, Angular, GraphQL
Stars: ✭ 177 (+200%)
Mutual labels:  twitter-api
ublog.el
🗿 elisp artifact – worked as a twitter client briefly
Stars: ✭ 18 (-69.49%)
Mutual labels:  twitter-api
Twitterdelete
💀 Delete your old, unpopular tweets.
Stars: ✭ 231 (+291.53%)
Mutual labels:  twitter-api
Jekyll Twitter Plugin
A Liquid tag plugin for the Jekyll blogging engine that embeds Tweets, Timelines and more from Twitter API
Stars: ✭ 204 (+245.76%)
Mutual labels:  twitter-api

<twitter-status>

Version Status macOS Build Status Linux Build Status Windows Build Status Dependency Status npm bundle size (minified + gzip)

Twitter Status Web Component

Examples

Live demo

Base example

Example

Example with attached image

Example with image

Example with hyperlinked hashtags/mentions/URLs and links colored from profile settings.

Example with image

Install

Load directly from unpkg:

<script async src="https://unpkg.com/twitter-status@latest/dist/twitter-status.min.js"></script>

Or installed as a dependency:

npm install twitter-status

And imported:

import 'twitter-status';

Polyfill

twitter-status relies on the shadow DOM and custom elements standards. You will likely need a polyfill until browser support is more ubiquitous.

Polyfills can be loaded via unpkg directly.

<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2/bundles/webcomponents-sd-ce.js"></script>

Or installed as a dependency:

npm install @webcomponents/webcomponentsjs

And imported:

import '@webcomponents/webcomponentsjs/bundles/webcomponents-sd-ce';

Usage

<twitter-status> takes a single value status that must be the full response of GET statuses/show/:id with the parameters include_entities=true and tweet_mode=extended.

You can embed the tweet in the HTML as a JSON string:

<twitter-status status="{\"id_str\":\"20\",...}"></twitter-status>

Or set the property in JS:

<twitter-status></twitter-status>

<script>
  document.querySelector('twitter-status').status = { "id_str": "20", ... };
</script>

Theme

You can theme the borders. Here is an card example.

<style>
  twitter-status.card {
    box-shadow: 0 3px 4px 1px rgba(0, 0, 0, .08), 0 1px 1px 1px rgba(0, 0, 0, .05);
    border-radius: 2px;
    border-width: 0;
  }
</style>
<twitter-status class="card" status="{\"id_str\":\"20\",...}"></twitter-status>

Example with card edges

Reasons

Why use <twitter-status> instead of Twitter's embedded tweets?

  • Open source - If you don't like something about it you can customize it to fit your exact needs.
  • Lightweight
  • Security - You can perform a security audit of <twitter-status> and know exactly what you are shipping. You don't have to worry about loading Twitter's JavaScript.
  • Privacy - <twitter-status> only loads embedded images and videos from Twitter's CDN. You don't have to worry about loading Twitter's JavaScript.
  • Native web component - <twitter-status> is built with standardized web APIs that will work out of the box with most frameworks.
  • No framework dependancies - Because it's based on native web components, it does not have a dependency on Angular, React, or any other framework.
  • Custom URL handling (coming soon) - When a user click on a #hashtag, @mention, etc, you can configure it that they stay within your site.
  • Cached data - If you are a news organization or displaying tweets from politicians, you can continue displaying deleted tweets.
  • Well tested - <twitter-status> as a nice suit of tests to make sure everything continues to render correctly.

Limitations of <twitter-status>

  • Web component polyfills - Shadow DOM and custom elements are not supported in all browsers, if you are not already using web components the pollyfills may add additional data cost.
  • Twitter cards - Twitter fetches data about links and embeds those in tweets. The data is not available via the API so <twitter-status> does not have access.
  • Status object - <twitter-status> requires the full tweet object. If you only have an ID you'll have to make a request to the Twitter API before using the component.
  • Activity counts - Because the status objects may be stale, like, retweet, and reply counts are not displayed.
  • Open source - This project is not backed by any financing so work gets done as time permits. There are known status types that are not supported yet.

What other options are there?

<twitter-user>

Looking for a way to embed users? Check out <twitter-user>.

Notes

TwitterStatus is released under an MIT license.

TwitterStatus is not affiliated Twitter, Inc.

Built, tested, and published with Nutmeg.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].