PHPackages                             mpalourdio/twitter-widgets - 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. mpalourdio/twitter-widgets

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

mpalourdio/twitter-widgets
==========================

PHP library that helps rendering twitter embedded timelines

0.2.0(9y ago)06172MITPHPPHP ^7.0

Since Oct 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mpalourdio/TwitterWidgets)[ Packagist](https://packagist.org/packages/mpalourdio/twitter-widgets)[ Docs](https://github.com/mpalourdio/TwitterWidgets)[ RSS](/packages/mpalourdio-twitter-widgets/feed)WikiDiscussions main Synced 4w ago

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

[![Build Status](https://camo.githubusercontent.com/e61e0a4873d4d78ba26edd987af92e29676dc3c26ba9fee26bff32741af68019/68747470733a2f2f7472617669732d63692e6f72672f6d70616c6f757264696f2f54776974746572576964676574732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mpalourdio/TwitterWidgets)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4af694613cfaf21051838e2469350cb38e564a263a14d8a92aa1dce56c277d30/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d70616c6f757264696f2f54776974746572576964676574732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mpalourdio/TwitterWidgets/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/b6a8154d3812428fd5159381d0f87fac2556ec23e9f58ae196a4530d4e235eb0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d70616c6f757264696f2f54776974746572576964676574732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mpalourdio/TwitterWidgets/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/be59245781489ee05f5da5bcbc807c9af7d14e23d703c8e06f21913e621108cd/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f63343465306431322d313738362d346538392d616332632d6466316239306432343930642f6d696e692e706e67)](https://insight.sensiolabs.com/projects/c44e0d12-1786-4e89-ac2c-df1b90d2490d)[![PHP 7.0+](https://camo.githubusercontent.com/661ec2b3805144b308f076cd3a7324daf1050bb3608c286ed3e0d49df1c3b03b/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e302b2d3838393242462e737667)](http://php.net)[![MIT Licensed](https://camo.githubusercontent.com/7bb7f9228d9997f09c313c4364647ef637486acd002aae26119a4e2cbf0ee808/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61646c6177736f6e2f766576616c2e737667)](LICENSE)

TwitterWidgets
==============

[](#twitterwidgets)

PHP library that helps rendering twitter embedded timelines

Requirements
============

[](#requirements)

PHP 7.0+ - Only Composer installation supported

Installation
============

[](#installation)

Run the command below to install via Composer

```
composer require mpalourdio/twitter-widgets
```

Usage
=====

[](#usage)

```
$widgetOptions = new WidgetOptions($options);
$userTimeline  = new TimelineBuilder($widgetOptions);
echo $userTimeline->renderWidget();
```

`$options` can handle these parameters :

Their PHP equivalent as array keys to use in the `$options` array are :

```
'class'           => 'A css class, by default it will be twitter-timeline',
'href'            => 'The link to the timeline',
'hrefText'        => 'A title for your timeline to display',
'dataWidgetId'    => 'Your data widget ID : must be a string (!)',
'dataTheme'       => 'ex: dark',
'dataLinkColor'   => 'ex: #cc0000',
'width'           => 300 (integer),
'height'          => 400 (integer),
'dataChrome'      => 'noheader nofooter noborders noscrollbar transparent', => a string with options separated by a single space
'dataBorderColor' => 'border color used by the widget',
'language'        => 'The widget language detected from the page, based on the HTML lang attribute of your content. You can also set the HTML lang attribute on the embed code itself.',
'dataTweetLimit'  => 20,
'dataRelated'     => 'benward,endform',
'dataAriaPolite'  => 'polite or assertive',
```

The [TimelineBuilder#renderWidget()](https://github.com/mpalourdio/TwitterWidgets/blob/master/src/Timeline/TimelineBuilder.php#L60-L69) method accepts a boolean to disable the javascript code added to each widget. Useful if you have more that one widget to avoid JS overhead.

When disabled, to add only once the needed javascript to your HTML code, use [OneTimeJsProvider#getOneTimeWidgetJs()](https://github.com/mpalourdio/TwitterWidgets/blob/master/src/Assets/OneTimeJsProvider.php) just before your ``

More information here :

ZF2
===

[](#zf2)

A ZF2 view helper is available here :

TWIG
====

[](#twig)

A twig extension is available here :

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~305 days

Total

4

Last Release

3317d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.5

0.2.0PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4fdbda774ff506689d09a6030ea897b292188db54d9edb53af8289d8313e9da8?d=identicon)[mpalourdio](/maintainers/mpalourdio)

---

Top Contributors

[![mpalourdio](https://avatars.githubusercontent.com/u/5034671?v=4)](https://github.com/mpalourdio "mpalourdio (61 commits)")

---

Tags

phptwittertwitter-timelinetwitter-widgetwidgettwitterwidgettimeline

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/mpalourdio-twitter-widgets/health.svg)

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

###  Alternatives

[kartik-v/yii2-social

Module containing useful widgets for Yii Framework 2.0 that integrates social functionalities from DISQUS, Facebook, Google etc.

91256.5k8](/packages/kartik-v-yii2-social)[sjaakp/yii2-timeline

Simile Timeline widget for Yii2.

161.1k](/packages/sjaakp-yii2-timeline)[coldtrick/widget_manager

Manage your widgets

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

PHPackages © 2026

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