PHPackages                             lagdo/twitter-feed - 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. lagdo/twitter-feed

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lagdo/twitter-feed
==================

Twitter feed based on the Jaxon ajax library.

1500PHP

Since Aug 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/lagdo/twitter-feed)[ Packagist](https://packagist.org/packages/lagdo/twitter-feed)[ RSS](/packages/lagdo-twitter-feed/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

A PHP Twitter feed package based on the Jaxon library
=====================================================

[](#a-php-twitter-feed-package-based-on-the-jaxon-library)

This package can add a Twitter feed to any PHP application.

Features
--------

[](#features)

- Can fetch home, user or mentions timelines.
- Can show many timelines on a single page.
- Cache fetched timelines to limit calls to the Twitter service.
- Trigger refresh on a regular basis (one minute interval).

Documentation
-------------

[](#documentation)

Install the jaxon library so it bootstraps from a config file and handles ajax requests. Here's the [documentation](https://www.jaxon-php.org/docs/v3x/advanced/bootstrap.html).

Install this package with Composer. If a [Jaxon plugin](https://www.jaxon-php.org/docs/v3x/plugins/frameworks.html) exists for your framework, you can also install it. It will automate the previous step.

Declare the package and the Twitter feeds in the `app` section of the [Jaxon configuration file](https://www.jaxon-php.org/docs/v3x/advanced/bootstrap.html).

```
    'app' => [
        // Other config options
        // ...
        'packages' => [
            Lagdo\TwitterFeed\Package::class => [
                'timelines' => [
                    'home' => [
                        'type'       => 'home', // The type of timeline
                        'count'      => 10,     // The number of tweets to show
                        'auth'       => [
                            'consumer_key'        => '',
                            'consumer_secret'     => '',
                            'access_token'        => '',
                            'access_token_secret' => '',
                        ],
                    ],
                ],
            ],
        ],
    ],
```

Multiple timelines can be declared. They can use the same authentication options or not.

```
    'app' => [
        // Other config options
        // ...
        'packages' => [
            Lagdo\TwitterFeed\Package::class => [
                'auth' => [
                    'timeline_auth' => [
                        'consumer_key'        => '',
                        'consumer_secret'     => '',
                        'access_token'        => '',
                        'access_token_secret' => '',
                    ],
                ],
                'timelines' => [
                    'home_timeline' => [
                        'type'       => 'home',
                        'count'      => 10,
                        'auth'       => 'timeline_auth',
                    ],
                    'user_timeline' => [
                        'type'       => 'user',
                        'count'      => 10,
                        'auth'       => 'timeline_auth',
                    ],
                ],
            ],
        ],
    ],
```

Insert the CSS and javascript codes in the HTML pages of your application using calls to `jaxon()->getCss()` and `jaxon()->getScript(true)`.

In the page that displays the Twitter feed, insert its HTML code with a call to `jaxon()->package(\Lagdo\TwitterFeed\Package::class)->timeline($timeline)->getHtml()`. The timeline must be specified before getting the HTML code.

Two cases are then possible.

- If the Twitter feed is displayed on a dedicated page, make a call to `jaxon()->package(\Lagdo\TwitterFeed\Package::class)->ready()` when loading the page.
- If the Twitter feed is loaded with an Ajax request in a page already displayed, execute the javascript code returned the call to `jaxon()->package(\Lagdo\TwitterFeed\Package::class)->getReadyScript()` when loading the page.

Notes
-----

[](#notes)

The styling of the timelines is defined in the CSS file under the `dist` directory.

Contribute
----------

[](#contribute)

- Issue Tracker: github.com/lagdo/twitter-feed/issues
- Source Code: github.com/lagdo/twitter-feed

License
-------

[](#license)

The project is licensed under the BSD 3-Clause license.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![feuzeu](https://avatars.githubusercontent.com/u/15174329?v=4)](https://github.com/feuzeu "feuzeu (18 commits)")

### Embed Badge

![Health badge](/badges/lagdo-twitter-feed/health.svg)

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

###  Alternatives

[padaliyajay/php-autoprefixer

CSS Autoprefixer written in pure PHP.

468.6M10](/packages/padaliyajay-php-autoprefixer)[contributte/di

Extra contrib to nette/di

466.0M18](/packages/contributte-di)[saloonphp/pagination-plugin

Official Pagination Plugin For Saloon v3

102.2M123](/packages/saloonphp-pagination-plugin)[marekweb/opaque-id

Opaque ID: Obfuscation scheme for integer IDs

1037.8k](/packages/marekweb-opaque-id)[coldtrick/widget_manager

Manage your widgets

224.5k](/packages/coldtrick-widget-manager)

PHPackages © 2026

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