X (Twitter) Feed Integration: setup and help
Quick start
- Upload and install the
mprxintegrationZIP in Modules > Module Manager. - Click Configure. In X (Twitter) Connection, leave Enable Module enabled.
- Enter Bearer Token for X API v2 reading and X Username without
@. Leave X User ID empty to resolve it automatically. - In Display Settings, select standard Display Hook
displayHome. Leave Enable Custom Widget off. - Keep Layout Mode at
gridand set a positive Number of Posts, such as6. Click Save. - Use Sync Now in the connection/cache panel to fetch fresh posts immediately, then read the result.
- Open the storefront at the selected hook, check the post cards, and click a card to confirm its X destination.
Requires PrestaShop 1.6 or later and PHP 7.1 or later.
Setup manual
Installation and first configuration
On older PrestaShop versions, use the equivalent module installation page. Open this module through Configure whenever you need to return to its settings.
X (Twitter) Connection
| Setting | Default | What you do |
|---|---|---|
| Enable Module | Yes | Show or hide the standalone storefront feed. |
| Bearer Token | Empty | Enter the X API v2 token used to read the feed. Your API access must permit the requested user and timeline endpoints. |
| X Username | Empty | Enter the handle without @. It is used for ID lookup and follow links. |
| X User ID | Empty | Leave empty for lookup on save, sync, or retrieval. A non-empty stored ID is reused. |
| API Key (Consumer Key) | Empty | Enter the OAuth 1.0a consumer key only if you configure blog publishing. |
| API Secret (Consumer Secret) | Empty | Enter the matching consumer secret for publishing. |
| Access Token | Empty | Enter the account’s OAuth 1.0a publishing token. It is separate from Bearer Token. |
| Access Token Secret | Empty | Enter the matching OAuth 1.0a token secret. |
Display Settings
| Setting | Default | What you do |
|---|---|---|
| Display Hook | displayHome |
Choose displayHome, displayFooterBefore, displayFooter, displayLeftColumn, or displayRightColumn. Your theme must render the selected hook. |
| Section Title | Follow us on X |
Set the feed heading. Leave empty to hide it. |
| Show Follow Button | Yes | Show the profile link in the feed header when the username is set. |
| Follow Button Text | Follow @ |
Set the text before the username. It is joined directly to the username. |
| Show on Mobile | Yes | Allow the feed for visitors detected as mobile by PrestaShop. |
| Setting | Default | What you do |
|---|---|---|
| Theme | light |
Choose light or dark cards. |
| Enable Custom Widget | No | This setting has no working custom-widget renderer in this version. Leave it off and use a standard display hook. |
The Display Hook menu also offers Custom Widget (use {widget} in templates), but this version does not implement that rendering path. Select a standard hook, including when placing the feed in a theme template.
Layout and appearance
| Setting | Default | What you do |
|---|---|---|
| Layout Mode | grid |
Choose grid, slider, or list. List uses separate vertical markup. |
| Number of Posts | 6 |
Set a positive count. X fetch logic caps the displayed count at 20. |
| Columns | 3 |
Choose 1-4 grid columns or visible carousel slides at widths of 992px and above. |
| Mobile Columns | 1 |
Choose 1 or 2 grid columns or visible carousel slides below 768px. |
| Max Text Length | 280 |
Limit displayed text. Use 0 to avoid truncating it. |
| Gap Between Posts (px) | 16 |
Set spacing in the grid, list, and carousel. Use 0 for no gap. |
| Border Radius (px) | 12 |
Set card corner rounding. |
| Hover Effect | elevate |
Choose elevate, glow, border, or none. |
Column controls apply to the grid and carousel. At widths from 768px to 991px, the carousel and grids with at least two posts use two columns; a one-post grid stays one column. Below 768px, they use Mobile Columns. Grids containing only one or two posts use one or two desktop columns respectively, and one column on mobile. The gap and border radius apply to every layout, including the carousel.
Post Content & Metadata
| Setting | Default | What you do |
|---|---|---|
| Show Tweet Text | Yes | Show the cached post text. |
| Show Media (Images) | Yes | Show attached images or preview images. Video and animated GIF attachments show preview images with a video badge. |
| Show Date | Yes | Show the cached relative date. |
| Show Likes Count | Yes | Show the like count returned by the API. |
| Show Retweets Count | Yes | Show the repost count returned by the API. |
| Show Replies Count | Yes | Show the reply count returned by the API. |
| Show Author | Yes | Show the available avatar, display name, and handle. |
| Exclude Replies | Yes | Request the timeline without replies. |
| Exclude Retweets | Yes | Request the timeline without reposts. |
Slider & Performance
| Setting | Default | What you do |
|---|---|---|
| Lazy Load Images | Yes | Load thumbnail/media images through JavaScript near the viewport. Disable if that loading is blocked. |
| Auto-Scroll (Slider) | Yes | Automatically advance the carousel. This has no effect on grid/list output. |
| Scroll Speed | 5000 |
Set the carousel interval in milliseconds. Choices are 2000, 3000, 5000, 8000, and 10000. |
| Cache Duration | 3600 |
Reuse retrieved data for this many seconds. Choices are 1800, 3600, 7200, 21600, 43200, and 86400. |
Feed retrieval and storefront behavior
The server resolves an empty X User ID through https://api.x.com/2/users/by/username/{username}. It fetches the timeline through https://api.x.com/2/users/{user_id}/tweets, including creation dates, public metrics, media attachments, and author data. Your configured account and API access must allow those requests. The module does not fetch a hashtag wall or combine multiple accounts.
The fetch logic caps the requested display count at 20. It requests up to three times that count before keeping the required number of results. Keep a positive count. Text is shortened to Max Text Length during retrieval; use 0 for full text. The metadata switches control card display, while the exclusion switches change the API request.
The selected standard hook renders a grid, carousel, or list. The header follow button opens https://x.com/{username}. Each card opens https://x.com/{author_handle}/status/{post_id} in a new tab. Video media remain previews, without an embedded player.
If you change accounts, update X Username and manually clear X User ID before saving. A non-empty ID is reused even after the username changes. Then use Sync Now.
Cache and refresh
The feed cache uses this local JSON file:
modules/mprxintegration/mprx_feed_cache.json
Feed settings and this file are shared by shops using the same module installation. Storefront requests reuse it while it is valid and fetch posts from X when it is missing or expired. Saving the main form clears it; this version has no scheduled feed-refresh worker.
Sync Now requires a Bearer Token and a resolved X User ID, then clears the cache and fetches fresh posts immediately. Clear Cache only deletes the file; the next storefront request fetches new data. If the API request then fails or returns no posts, no cached posts remain. Check the timeline, credentials and API access, then retry.
Only non-empty API results are cached. An expired file is not used as a fallback when retrieval fails, so the feed can disappear until a later request succeeds. API counts and relative dates reflect the cached response.
Auto-Publish to X
Configure the four OAuth 1.0a credential fields in X (Twitter) Connection if you need blog publishing. A read-only Bearer Token alone does not configure this publishing path. Then use the separate Auto-Publish to X form:
| Setting | Default | What you do |
|---|---|---|
| Enable Auto-Publish | No | Enable automatic handling of eligible published blog posts when add/update hooks run. |
| Caption Template | {title}\n\n{url} |
Build the X post text from {title}, {excerpt}, {url}, and {shop_name}. The publisher limits text to 280 characters. |
The Blog Posts panel requires MPR Blog Revolution and provides a manual publishing action when the publisher is configured. It uses the blog title, excerpt, URL, and featured image when available. The publisher supports text and image/GIF media. Publication runs through shared queue and history records that prevent duplicate handling. If the panel reports a queue or reconciliation error, check the existing result before retrying.
Feed display and publishing have separate switches, but saving the main feed form resets the publishing switch and caption because those fields are absent from that form. After each main-form save, save Enable Auto-Publish and its caption again in the separate publishing form.
Publishing is suppressed when Social Revolution’s X takeover flag is set. It can also be blocked on a development/staging or unresolved shop host by the outbound-write policy. The UI reports the reason. Another installed social module loading an older shared publisher package can block the send; update the installed social modules together if you see that error.
Configuration examples and theme adjustments
The examples below describe values to enter in the back-office forms. They are not shell commands. Replace account names and credentials with real values. The theme hook must match Display Hook.
Display a homepage grid with six posts, three columns on desktop, one column on mobile, and original posts only:
MPRX_DISPLAY_HOOK=displayHome
MPRX_LAYOUT=grid
MPRX_POST_COUNT=6
MPRX_COLUMNS=3
MPRX_MOBILE_COLUMNS=1
MPRX_EXCLUDE_REPLIES=1
MPRX_EXCLUDE_RETWEETS=1
Use a compact right-column list without media or engagement counters:
MPRX_DISPLAY_HOOK=displayRightColumn
MPRX_LAYOUT=list
MPRX_POST_COUNT=3
MPRX_SHOW_MEDIA=0
MPRX_SHOW_LIKES=0
MPRX_SHOW_RETWEETS=0
MPRX_SHOW_REPLIES=0
MPRX_TEXT_LENGTH=140
Use the slider with automatic scrolling every eight seconds:
MPRX_LAYOUT=slider
MPRX_COLUMNS=3
MPRX_AUTO_SCROLL=1
MPRX_SCROLL_SPEED=8000
Customize the Blog Revolution caption sent to X:
{title}
{excerpt}
Read more: {url}
Available caption placeholders are:
{title}
{excerpt}
{url}
{shop_name}
Render the module through a standard PrestaShop hook in a theme template, with the module configured for the same hook:
{hook h='displayHome' mod='mprxintegration'}
Theme developers can override the storefront templates here:
themes/your_theme/modules/mprxintegration/views/templates/hook/feed.tpl
themes/your_theme/modules/mprxintegration/views/templates/hook/post_item.tpl
Useful CSS selectors for theme-level styling:
.mprx-section { margin-top: 32px; }
.mprx-title { font-size: 1.25rem; }
.mprx-item { border-radius: 8px; }
[data-theme="dark"] .mprx-item { background: #16181c; }
.mprx-follow-btn { text-transform: none; }
The feed cache uses this local JSON file:
modules/mprxintegration/mprx_feed_cache.json
For a carousel, check the configured columns and gap at desktop, tablet, and mobile widths. Keep CSS and template changes in your theme.
Verification and troubleshooting
- If the section is absent, check Enable Module, the source fields, Show on Mobile, and the selected hook. The module returns no section when no items are available.
- Check that your theme calls
displayHeaderto load the stylesheet and JavaScript, and renders your selected display hook. - If images remain blank, inspect browser network errors. Try disabling lazy loading and check the image URLs.
- If the layout is wrong, test the grid first, then verify the carousel at desktop and mobile widths.
- If MPR Social Revolution has its
X_ACTIVEsetting enabled, this standalone feed is suppressed. This check reads the saved flag; it does not require Social Revolution to be currently enabled as a module.
Open the module’s Integrity page for configuration and hook checks. License, Support, and Update are maintenance pages. Test the actual destinations after changing account identifiers or feed sources.
Disable or uninstall
Set Enable Module to No and save to hide the feed while retaining its source and display configuration. Saving the main form resets the publishing switch and caption; review and save the separate publishing form afterwards if publishing should continue. Uninstall through the module manager to remove this module’s configuration, local cache, and admin menu entries. Shared mpr_social_publish and mpr_social_queue tables are marked shared and are retained on uninstall. Uninstall does not delete posts already sent to the platform.
Questions
1
Does the X feed load resources from external services?
Your shop retrieves posts through the saved X API credentials and caches them locally. Post cards can load author avatars and media from URLs returned by X, and their links open X in a new tab. Review these external resources and destinations when configuring your store privacy information and consent tools.
Known Issues
5
PHP 7.1 compatibility
Credential could not be saved from setup checks
Translated module labels not displayed
Setup warning did not reflect saved settings
Incomplete translations
Feature Requests
4
Implemented
One-click module updates
Multilingual interface
Installation checks and repair
Scheduled X publishing
Changelog
v1.0.142026-09-03
- Addedcomplete FR/DE/ES/IT/PL translations
- FixedShip X required config package helper
- FixedAdd migrateFromPsConfiguration for ps_configuration cleanup
Older releases
v1.3.02026-04-20
- Addedadmin menu management via MenuInstaller for streamlined module setup
- AddedLicense management tab with key management and renewal options
- Addedself-healing integrity checks for automatic diagnostics and repair
- Addedcomplete FR/DE/ES/IT/PL translations
v1.2.02026-02-04
- AddedPS 9 / Hummingbird theme compatibility
- Addedlist layout alongside existing card-grid layout
- ImprovedAPI error handling — graceful fallback when X API rate limit reached
- Fixedtweet card images not displaying for tweet threads with embedded media
v1.0.02025-08-05
- Initialrelease: X (Twitter) timeline display for PrestaShop
- InitialEmbed user timeline with configurable post count and layout
- InitialBack-office configuration for X handle and Bearer token
- InitialCompatible with PS 1.7.x and PS 8.x
v1.1.02025-07-25
- Addedhashtag timeline option alongside user timeline
- Addedtweet count limiter — show up to 20 most recent posts
Demo
Test the full module before you buy
Buy a licence later and keep your settings.
- Your 30-day demo Test it on your own shop for 30 days from the first install.
- Ready demo shop Explore a ready demo shop in your browser.
- No registration No account, email or store domain needed.
By downloading, you accept the demo terms and privacy policy.
By opening this demo you accept the demo terms and the privacy policy.