PHPackages                             hashandsalt/kirby3-twitter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hashandsalt/kirby3-twitter

AbandonedArchivedKirby-plugin[Utility &amp; Helpers](/categories/utility)

hashandsalt/kirby3-twitter
==========================

Kirby Twitter Plugin

v1.0.3(4y ago)8604[1 issues](https://github.com/HashandSalt/kirby3-twitter/issues)MITPHP

Since Aug 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/HashandSalt/kirby3-twitter)[ Packagist](https://packagist.org/packages/hashandsalt/kirby3-twitter)[ RSS](/packages/hashandsalt-kirby3-twitter/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (6)Used By (0)

Kirby Twit: Work with Twitter Timelines
=======================================

[](#kirby-twit-work-with-twitter-timelines)

A small plugin that is a wrapper around [twitteroauth](https://github.com/abraham/twitteroauth). Allows you to display tweets on your website without having use Twitters embedded timelines. The plugin supports both V1.1 and V2 of the API. Plugin was tested on PHP 8 using Kirby 3.6+

Features:

- Display tweets on your site using your own markup.
- Caches results from API, in a unique file per set
- Automagically turns all links, hashtags and @ mentions into clickable links.

---

Commerical Usage
----------------

[](#commerical-usage)

This plugin is free but if you use it in a commercial project please consider to

- [make a donation 🍻](https://paypal.me/hashandsalt?locale.x=en_GB) or
- [buy a Kirby license using this affiliate link](https://a.paddle.com/v2/click/1129/36141?link=1170)

---

How to use Kirby Twitter
------------------------

[](#how-to-use-kirby-twitter)

First you need access to the Twitter API, and for that you need an account. Register your website as an [application here](https://developer.twitter.com/en/apps).

---

Installation
------------

[](#installation)

### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby3-twitter`.

### Composer

[](#composer)

```
composer require hashandsalt/kirby3-twitter

```

Setup
-----

[](#setup)

You wont get far without authenticating. Set the following in your config to gain access to your feed:

```
'cache.hashandsalt.kirby-twitter.tweets' => true,
'twit.bearer'            => 'XXX',
'twit.consumerkey'       => 'XXX',
'twit.consumersecret'    => 'XXX',
'twit.accesstoken'       => 'XXX',
'twit.accesstokensecret' => 'XXX',
'twit.apiVersion'        => '1.1',
'twit.cachelife'         =>  30,

```

Usage
-----

[](#usage)

To switch between APIs set the config option accordingly. `'twit.apiVersion' => '1.1'`

Assuming the below details to work with:

```
$tweetid = 1469448484185067523;
$myid = 815859093273509888;
$screenName = 'getkirby';

```

Snippets
--------

[](#snippets)

There are two helpful snippets to get you started.

### API V1.1

[](#api-v11)

Single Tweet

```

```

Users Timeline

```

```

### API V2

[](#api-v2)

Single Tweet

```

```

Users Timeline

```

```

Usage
-----

[](#usage-1)

The Plugin makes three page methods available.

### For getting single tweets or timelines

[](#for-getting-single-tweets-or-timelines)

```
$page->tweets(...);

```

### For getting user info

[](#for-getting-user-info)

```
$page->twitterUserName($myid);
$page->twitterUserId($screenName);

```

### API V1.1

[](#api-v11-1)

#### Single Tweet

[](#single-tweet)

To get a sungle tweet, set the name of the cache data file as the first param, second param is the API path, followed by optional API parameters.

```
$result = $page->tweets('mysingletweet', 'statuses/show', ['id' => $tweetid, 'tweet_mode' => 'extended']);

```

#### Username From ID

[](#username-from-id)

Returns a users name from an ID number

```
$result2 = $page->twitterUserName($myid);

```

#### ID From Username

[](#id-from-username)

Returns a users ID from an username

```
$result3 = $page->twitterUserId($screenName);

```

#### Own Time line

[](#own-time-line)

Returns a your own timeline given an ID. Set the name of the cache data file as the first param, second param is the API path, followed by optional API parameters.

```
$result4 = $page->tweets('mytweets', 'statuses/home_timeline', ['count' => 20, 'exclude_replies' => true, 'tweet_mode' => 'extended']);

```

#### Other users Time line

[](#other-users-time-line)

Returns a users timeline given an ID. Set the name of the cache data file as the first param, second param is the API path, followed by optional API parameters.

```
$result5 = $page->tweets('someUser', 'statuses/user_timeline', ['screen_name' => $screenName, 'count' => 20, 'exclude_replies' => true, 'tweet_mode' => 'extended']);

```

### API V2

[](#api-v2-1)

#### Single Tweet

[](#single-tweet-1)

To get a sungle tweet, set the name of the cache data file as the first param, second param is the API path, followed by optional API parameters.

```
$result = $page->tweets('mysingletweet', 'tweets', ['ids' => $tweetid]);

```

#### Username From ID

[](#username-from-id-1)

Returns a users name from an ID number

```
$result2 = $page->twitterUserName($myid);

```

#### ID From Username

[](#id-from-username-1)

Returns a users ID from an username

```
$result3 = $page->twitterUserId($screenName);

```

#### Get a users Timeline

[](#get-a-users-timeline)

Returns a users timeline given an ID. Set the name of the cache data file as the first param, second param is the API path, followed by optional API parameters.

```
$result4 =  $page->tweets($result3, 'users/'.$result3.'/tweets', [
  'max_results' => 20
]);

```

Known Issues
------------

[](#known-issues)

The Twitter API is a bit dumb. It counts retweets as a tweet. If you ask for 6 tweets and only got 4 back, 2 of them were probably retweeted. Not much to be done about that, other then asking for more then you need and only looping out the first 6, but you could still run into the problem again.

License
-------

[](#license)

MIT

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Total

4

Last Release

1612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d18b7200637c15341417dfabb7c51c7ec3fda44f6a24cb4780b5e7c14f309118?d=identicon)[hashandsalt](/maintainers/hashandsalt)

---

Top Contributors

[![HashandSalt](https://avatars.githubusercontent.com/u/28439755?v=4)](https://github.com/HashandSalt "HashandSalt (15 commits)")[![S1SYPHOS](https://avatars.githubusercontent.com/u/12161504?v=4)](https://github.com/S1SYPHOS "S1SYPHOS (2 commits)")[![MaluNoPeleke](https://avatars.githubusercontent.com/u/1446541?v=4)](https://github.com/MaluNoPeleke "MaluNoPeleke (1 commits)")[![schnti](https://avatars.githubusercontent.com/u/1868482?v=4)](https://github.com/schnti "schnti (1 commits)")

### Embed Badge

![Health badge](/badges/hashandsalt-kirby3-twitter/health.svg)

```
[![Health](https://phpackages.com/badges/hashandsalt-kirby3-twitter/health.svg)](https://phpackages.com/packages/hashandsalt-kirby3-twitter)
```

###  Alternatives

[distantnative/retour-for-kirby

Manage redirects and track 404s right from the Kirby CMS Panel

14689.4k1](/packages/distantnative-retour-for-kirby)[mzur/kirby-uniform

A versatile Kirby plugin to handle web form actions.

26068.3k13](/packages/mzur-kirby-uniform)[arnoson/kirby-vite

Vite helper for Kirby CMS

9759.2k3](/packages/arnoson-kirby-vite)[thathoff/kirby-git-content

Plugin to track changes to content in a git repository.

15343.7k](/packages/thathoff-kirby-git-content)[sylvainjule/locator

A map &amp; geolocation field, built on top of open-source services / Mapbox

11237.3k1](/packages/sylvainjule-locator)[tobimori/kirby-seo

The default choice for SEO on Kirby: Implement technical SEO &amp; Meta best practices with ease and provide an easy-to-use editor experience

10039.7k1](/packages/tobimori-kirby-seo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
