PHP code example of rainlab / twitter-plugin

1. Go to this page and download the library: Download rainlab/twitter-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rainlab / twitter-plugin example snippets


{% component 'twitterFavorites' %}

{% for favorite in twitterFavorites.all %}
    <blockquote>“{{ favorite.text_processed|raw }}”</blockquote>

    <p class="author">
        <img src="{{ favorite.user.profile_image_url_https }}"/>
        <span>{{ favorite.user.name }}</span>
        <a href="{{ 'https://twitter.com/'~favorite.user.screen_name }}">@{{ favorite.user.screen_name }}</a>
    </p>
{% endfor %}