pixney / statamic-twitter
0.0.2
2021-01-22 21:00 UTC
Requires
- php: ^7.4
- abraham/twitteroauth: ^2.0
- statamic/cms: ^3.0.0
README
Display your twitter feed on your website using api v1.1. Currently there will be an issue if you fully cache your site. But we will add an option to fetch the feed with JavaScript soon.
Twitter Credentials
Within your Twitter account you can create an app and generate these details.
Available .ENV settings
Antlers Tag
{{ statamic_twitter cache="3600" count="6"}}
{{ date format="Y-m-d" }}
{{ text }}
{{ /statamic_twitter }}
Available Parameters
Recipes
<section class="my-16 bg-gray-50 p-24">
<div class="container mx-auto">
<div class="grid grid-cols-3 gap-y-8 gap-x-8 ">
{{ statamic_twitter cache="3600" count="3"}}
<div class="bg-white p-8 shadow-xl">
{{ if media }}
{{ media }}
<img class="w-full h-72 object-cover" src="{{media_url_https}}" alt="">
{{ /media }}
{{ else }}
<img class="w-full h-72 object-cover" src="https://loremflickr.com/640/360" alt="">
{{ /if }}
<div>
<p class="my-4 text-sm"> <span class="font-bold">Posted:</span> {{ date format="Y-m-d" }}</p>
<p class="leading-snug">{{ text }}</p>
</div>
</div>
{{ /statamic_twitter }}
</div>
</div>
</section>