2017 © Pedro Peláez
 

magento2-module magento2-twitter

Twitter feed.

image

jasonalvis/magento2-twitter

Twitter feed.

  • Wednesday, November 29, 2017
  • by jasonalvis
  • Repository
  • 1 Watchers
  • 4 Stars
  • 727 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 9 Versions
  • 2 % Grown

The README.md

Magento 2: Twitter

Twitter feeds using the most popular TwitterOAuth PHP library., (*1)

Multiple configuration options giving you full control over your tweets. Global integration option available along with an easy to use widget., (*2)

Installation

Recommended installation through composer, within your Magento root directory enter the following:, (*3)

composer require alvis/magento2-twitter

Enable the module

php bin/magento module:enable Alvis_Core
php bin/magento module:enable Alvis_Twitter

You may also need to re-compile:, (*4)

php bin/magento setup:upgrade
php bin/magento setup:di:compile

Create your Twitter app

You will need to create a Twitter app to get your API credentials. Please use the following steps as a guide:, (*5)

  1. Go to https://apps.twitter.com and login using your Twitter account credentials
  2. Create a new application filling in your details. The Callback URL can be left empty
  3. Click on the 'Keys and Access Tokens' tab and then 'Create my access token'

Module configuration

The module configuration can be found through the main menu under Alvis. As a minimum please ensure you enter your screen name, consumer key, consumer key secret, access token and access token secret., (*6)

Display settings

Multiple settings available giving you full control over your tweets including:, (*7)

  • Number of tweets to show
  • Show user follow button
  • Show the user screen name
  • Show the user profile image
  • Make URL links clickable
  • Show the reply link
  • Show the retweet link
  • Show the favorite link
  • Add rel="nofollow" for URL links
  • Make # tags clickable
  • Make @ tags clickable
  • Open links in a new window

Media settings

Multiple settings for when tweets include images:, (*8)

  • Show media URLs, if set to no media URLs will be stripped from the tweet
  • Show media as clickable links not images
  • Show media as images not links
  • Select the media image size, thumbnail, small, medium or large

Search settings

Display tweets based off a search query, used when displaying searched tweets., (*9)

Integration

By default Twitter displays in the main content., (*10)

Extend the layout within your theme <VendorName>/<ThemeName>/Alvis_Twitter/layout/default.xml., (*11)

Move xml block:, (*12)

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="alvis_twitter.latest" destination="footer" after="-" />
        <move element="alvis_twitter.mentions" destination="footer" after="-" />
        <move element="alvis_twitter.search" destination="footer" after="-" />
    </body>
</page>

Remove xml block:, (*13)

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="main">
            <referenceBlock name="alvis_twitter.latest" remove="true" />
            <referenceBlock name="alvis_twitter.mentions" remove="true" />
            <referenceBlock name="alvis_twitter.search" remove="true" />
        </referenceContainer>
    </body>
</page>

Update xml block arguments:, (*14)

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="alvis_twitter.latest">
            <arguments>
                <argument name="title" xsi:type="string">New Block Title</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Override the default templates within your theme create the following files:, (*15)

<VendorName>/<ThemeName>/Alvis_Twitter/templates/tweets.phtml
<VendorName>/<ThemeName>/Alvis_Twitter/templates/widget/tweets.phtml

The original contents of the files can be found under:, (*16)

<Root>/vendor/alvis/magento2-twitter/view/frontend/templates/tweets.phtml
<Root>/vendor/alvis/magento2-twitter/view/frontend/templates/widget/tweets.phtml

Widget

Alternatively you can use the Twitter Feed widget which has the following settings available:, (*17)

  • Number of tweets to show
  • Title
  • Type of feed to show, latest tweets, mentioned tweets or search tweets
  • Search query

Styling

Currently no styling is provided with the module, please create your own., (*18)

The Versions

29/11 2017

dev-master

9999999-dev

Twitter feed.

  Sources   Download

MIT OSL-3.0 AFL-3.0

The Requires

 

29/11 2017
24/01 2017

0.0.7

0.0.7.0

Twitter feed.

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

 

08/01 2017

0.0.6

0.0.6.0

Twitter feed.

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

 

08/01 2017

0.0.5

0.0.5.0

Twitter feed.

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

 

08/01 2017

0.0.4

0.0.4.0

Twitter feed.

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

 

08/01 2017

0.0.3

0.0.3.0

Twitter feed.

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

 

03/01 2017

0.0.2

0.0.2.0

Twitter feed.

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

 

27/10 2016

0.0.1

0.0.1.0

Twitter feed.

  Sources   Download

OSL-3.0 AFL-3.0

The Requires