Module Twitter
Module to show public/friends Twitter timeline
Introduced in Tiki10. See https://sourceforge.net/p/tikiwiki/code/42459
Parameters
Shows the tweets from the Twitter timeline of a userRequired parameters are in
bold.Go to the source code
| Parameters | Accepted Values | Description | Default | Since |
|---|---|---|---|---|
user |
Tiki user to show Twitter timeline of. | |||
timelinetype |
Show public|friends timeline. | public | ||
search |
Search string. | tikiwiki | ||
showuser |
Show username in timeline. y|n | n |
Configuration
1.1.1. Creating the Twitter / X Application
Go to the Twitter/X Developer Portal:
Log in with your Twitter/X account and create a Developer account if you do not already have one.
Create a new Project and App.
Once the application is created, locate the following information in the application settings:
- API Key (Consumer Key)
- API Key Secret (Consumer Secret)
You will need these values later when configuring Tiki.
Configure the application's callback URL.
Replace:
https://your-domain.com
by:
https://your-domain.example/tiki/tiki-login_hybridauth.php?provider=Twitter
The callback URL configured in Twitter/X must exactly match the URL used by Tiki. Even a missing /tiki/ may prevent authentication from working.
-
1.1.2. Configuration in Tiki
Log in to Tiki as an administrator.
Go to:
Administration → Features
or directly:
/tiki-admin.php?page=features
Enable:
Social Networks
and click 'Apply'.
Go to:
Administration → Users & Community → Social Networks
or directly:
/tiki-admin.php?page=socialnetworks
In the 'General' tab, select:
from the list of available social networks and click 'Apply'.
Open the 'Settings' tab and locate the 'Twitter' section.
Fill the following fields:
Consumer Key
Enter the API Key provided by Twitter/X.
Example:
ABCDEF123456789XYZ
Consumer Secret
Enter the API Secret provided by Twitter/X.
Example:
1234567890abcdef1234567890abcdef
Social networks login base URL
Enter the URL used by Tiki to receive the authentication callback.
Example:
https://your-domain.example/tiki/tiki-login_hybridauth.php?provider=
If your Tiki instance is installed in a subdirectory, include that directory in the URL.
For example:
https://your-domain.example/tiki/tiki-login_hybridauth.php?provider=
If Tiki is installed at the web root:
https://your-domain.example/tiki-login_hybridauth.php?provider=
An incorrect value may result in errors such as:
No route found
or
Not Found
during the authentication process.
Twitter login allowed?
Check:
Twitter login allowed?
Twitter auto-create user?
Check:
Twitter auto-create user?
This allows Tiki to automatically create a local user account when a user logs in with Twitter/X for the first time.
Click 'Apply'.
Administration → Users & Community → Social Networks → Settings → Twitter
Testing the Configuration
Log out of Tiki.
Open:
tiki-login.php
You should see a button similar to:
Login via Twitter
or
Login via X
Click the button and authorize the application on Twitter/X.
If authentication succeeds:
- The user is logged into Tiki.
- A local Tiki account is automatically created (if auto-create is enabled).
- Subsequent logins will use the same Tiki account.
Troubleshooting
Error: No route found
This usually indicates that the callback URL is incorrect.
Verify:
Social networks login base URL
matches the actual installation path of your Tiki instance.
Example:
https://example.org/tiki/tiki-login_hybridauth.php?provider=
instead of:
https://example.org/tiki-login_hybridauth.php?provider=
when Tiki is installed in a /tiki subdirectory.
Error: Not Found
Verify:
- The file tiki-login_hybridauth.php exists.
- The callback URL is correct.
- Apache rewrite rules are properly configured.
- The Twitter/X callback URL exactly matches the one configured in Tiki.
Error: Authentication succeeds but login fails
Verify:
- PHP sessions are working correctly.
- HTTPS is consistently used.
- Social Networks feature is enabled.
- Twitter auto-create user is enabled if new users should be created automatically.
Related: