PHPackages                             mpalourdio/zf2-twitter-widget - 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. [Framework](/categories/framework)
4. /
5. mpalourdio/zf2-twitter-widget

AbandonedArchivedLibrary[Framework](/categories/framework)

mpalourdio/zf2-twitter-widget
=============================

ZF2 view helper to easily display twitter timelines widgets

0.2.0(9y ago)2172MITPHPPHP ^7.0

Since Oct 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mpalourdio/zf2-twitter-widget)[ Packagist](https://packagist.org/packages/mpalourdio/zf2-twitter-widget)[ Docs](https://github.com/mpalourdio/zf2-twitter-widget)[ RSS](/packages/mpalourdio-zf2-twitter-widget/feed)WikiDiscussions main Synced 1mo ago

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

[![Build Status](https://camo.githubusercontent.com/8235cec02b419c2bf4ae875e340222c09ef15ef580acc9b570eef1e9b7554664/68747470733a2f2f7472617669732d63692e6f72672f6d70616c6f757264696f2f7a66322d747769747465722d7769646765742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mpalourdio/zf2-twitter-widget)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/cbef5474440da94f71ff6702698e984742582c45643861f41d9bc6c3744510ff/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d70616c6f757264696f2f7a66322d747769747465722d7769646765742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mpalourdio/zf2-twitter-widget/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/ff725b092ecc6dd3868eced05621d67db24f8791e72a429a360c03418c686a54/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6d70616c6f757264696f2f7a66322d747769747465722d7769646765742f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/mpalourdio/zf2-twitter-widget/?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/0eb074298cb84b3f002297462563ce96d35d6979bc76925ff70f4ccbe8b80fe8/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65333034393635362d353865382d343036652d623835612d3438653263373964383164662f6d696e692e706e67)](https://insight.sensiolabs.com/projects/e3049656-58e8-406e-b85a-48e2c79d81df)[![PHP 7.0+](https://camo.githubusercontent.com/661ec2b3805144b308f076cd3a7324daf1050bb3608c286ed3e0d49df1c3b03b/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e302b2d3838393242462e737667)](http://php.net)[![MIT Licensed](https://camo.githubusercontent.com/7bb7f9228d9997f09c313c4364647ef637486acd002aae26119a4e2cbf0ee808/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61646c6177736f6e2f766576616c2e737667)](LICENSE)

zf2-twitter-widget
==================

[](#zf2-twitter-widget)

ZF2 view helper to easily display twitter embedded timelines widgets in a ZF2 project. Based on this library :

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

[](#requirements)

PHP 7.0+ - Only Composer installation supported

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

[](#installation)

Run the command below to install via Composer

```
composer require mpalourdio/zf2-twitter-widget
```

Add "ZfTwitterWidget" to your **modules list** in **application.config.php**

Usage
=====

[](#usage)

- 1. Create a timeline widget here :
- 2. In the javascript generated code, get the URL and the data-widget-id (minimum information required)
- 3. Finally, in a view, use with

```
echo $this->tw(
        [
            'dataWidgetId' => '1245687955000', => the id must be a string (quotes), because of long integer converted to float
            'href'         => 'https://twitter.com/NickName',
            'hrefText'     => 'Here type a title'
        ],
        true/false (true is default)
    );
```

All the following options are handled :

Their PHP equivalent as array keys to use in the view helper 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',
```

You can give an instance of `TwitterWidgets\Options\WidgetOptions` instead of an array (or any implementation of `TwitterWidgets\Timeline\WidgetOptionsInterface`).

```
$options = new TwitterWidgets\Options\WidgetOptions();
$options->setDataWidgetId('1245687955000');
$options->setHref('https://twitter.com/NickName');
$options->setHrefText('Here type a title');
echo $this->tw($options);
```

The view helper second parameter is a boolean (true by default), that indicates if you must render the javascript code for your widget. If you have more that one widget on your page, use the `OneTimeJsViewHelper` to only add once the javascript code, just before your ``. This will avoid some overhead. See

```
$this->inlineScript()->captureStart();
echo $this->twJS();
$this->inlineScript()->captureEnd();
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

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

3320d 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 (51 commits)")

---

Tags

moduletwittertwitter-widgetzend-frameworkzf2zf2-moduleframeworktwitterzf2widgettimeline

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[socalnick/scn-social-auth

Uses the HybridAuth PHP library to Enable authentication via Google, Facebook, Twitter, Yahoo!, etc for the ZfcUser ZF2 module.

21974.2k3](/packages/socalnick-scn-social-auth)[zucchi/zucchi

Zucchi Component Library for Zend Framework 2

121.5k1](/packages/zucchi-zucchi)

PHPackages © 2026

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