Show Recent twitter timeline on your site.
This plugin requires Craft CMS 4 or later and PHP 8.
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require ssplugin/ss-twitter-feed
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for SS Twitter Feed.
A plugin for Craft CMS that allows you to retrive your Twitter timeline.
Once you’ve installed the SS Twitter Feed plugin. Go to plugin settings to connect to twitter. Just click on button get your Twitter Access Token and Twitter Secret.
-You can directly access multidimensional array of your Twitter posts using following method. Each post has Following components you can get to:
- If you wish exclude retweet, Just pass parameter like craft.ssTwitterFeed.displayPost( '5', 'exclude_retweets' ).
- Multiple images array of your twitter.
- name ( the name of the Twitter account )
- screen_name ( the screen name of the Twitter account )
- text ( Twitter text )
- text_html ( Twitter text with links )
- profile_image_url( Profile picture of your Twitter )
- url ( the Twitter url )
- image_url ( Twitter media image url )
- images ( Multiple images array of your Twitter )
- retweet_count (Total number of retweet count )
- favorite_count (Total number of likes the post recieved )
- created_at ( The tweet post time )
- tweet_date ( To display original date format which is given by twitter, Also you can be able to filter/formats date as you wish using twig date filter )
- retweet_link (The retweet link on site )
- favorite_link ( favorite link )
Example:
{% for tweet in craft.ssTwitterFeed.displayPost( '5' ) %}
{{ tweet.url }}
{{ tweet.screen_name }}
{{ tweet.text }} {# OR {{ tweet.text_html | raw }} #}
{% for images in tweet.images %}
{{ images.media_url }}
{% endfor %}
{{ tweet.created_at }}
{{ tweet.retweet_count }}
{{ tweet.favorite_count }}
{% endfor %}
BENEFITS:
- Hassle-free and Simple setup( No need to create Twitter App).
- Limit number of tweets to show.
- Increment social commitment among you and your clients.
- Show your Twitter content your way to perfectly match your website style.
- The Plugin is updated consistently with new features, bug-fixes and Twitter API changes.
- Support is speedy, effective and powerful.
This SS Twitter Feed plugin for craft is open-sourced software licensed under the MIT license
Brought to you by SystemSeeders