Introduction
Integrate your Twitter account into your WordPress site. Easily embed Twitter profiles and Tweets into any page or blog post. Add your Twitter profile to the widgets area on your WordPress site.
All features of this plugin share a single Twitter API key alleviating the need to have a separate API key for each shortcode and widget.
Features
- Shortcode to embed a Twitter profile
- Shortcode to embed a Tweet
- Shortcode to embed your latests Tweet(s)
- Widget to embed a Twitter profile
Profiles shortcode
Adding your own profile can be done with ease, simply add the “twitter_profile” shortcode and the number of most recent tweets you wish to show with your profile.
[[twitter_profile tweets="1"]]
[twitter_profile tweets=”1″ cache=10080]
Adding someone else’s Twitter account can be achieved by including the “user” argument, set this to the handle of the required Twitter account.
[[twitter_profile user="eightbitraptor" tweets="0"]]
[twitter_profile user=”eightbitraptor” cache=10080]
If you add an account handle which doesn’t exist, a clean error will be displayed.
[[twitter_profile user="unknown user"]]
[twitter_profile user=”fhjkhlkgfhjghk” tweets=”0″ cache=10080]
Tweets shortcode
The tweet shortcode can be used to embed a single tweet into a page or post. Finding a tweet on Twitter, click on the tweet and the ID number will be displayed in the address bar. The URL for the example below is: https://twitter.com/jack/status/20
[[tweet id="20"]]
[tweet id=”20″ cache=10080]
If a tweet ID does not exist, a clean error will be displayed.
[[tweet id="2"]]
[tweet id=”2″ cach=10080]
Latest tweets shortcode
Updating your most recent tweet could be challenging if done manually; especially if you are a regular user of Twitter. To simplify showing your most recent Tweet or Tweets, use the “latest_tweet” shortcode. Setting the “count” argument will allow you to show any number of your most recent Tweets.
[[latest_tweet count="2"]]
[latest_tweet count=”2″ cache=10080]
Profile widget
A live example of the Twitter profile widget can be seen on the right hand side of this page, alternatively a screen shot is provided for reference.
Installation
F13 Twitter can be installed via the Plugins section of WordPress. If you wish to download the source code, simply upload the code to the wp-content/plugins folder on your webserver, then visit the Plugins section of WordPress admin to activate the F13 Twitter.
Configuration
Configuration of F13 Twitter is by the form provided in your WordPress Admin area under the menu
"F13 Admin" >> "Twitter"
Here you will be able to add a Twitter API key allowing the plugin to function.
Settings
- Access token: Provided by the Twitter API
- Access token secret: Provided by the Twitter API
- API key: Provided by the twitter API
- API key secret: Provided by the twitter API
- Cache timeout: Enter the time in minutes that you wish Twitter data to be cached for. A higher number will cache data for longer, reducing the number of API calls. A lower number will allow data to be updated more regularly, showing your latest Tweets within minutes
- User: The default Twitter user account for all shortcodes and widgets, this option is required for use of the widget and latest_tweets shortcode
- Tweets: The default number of tweets to show in the profile widget
Obtain a Twitter API key
- Visit https://developer.twitter.com/en/portal/projects-and-apps
- Click “+ new project” and fill in the application form
- If asked which version of the API to use, select version 1.1
- Once completed, copy your Access tokens and API keys to the relevant fields in F13 Admin >> Twitter
WordPress
GitHub
Last commit: July 28, 2022 - 06:57pm
Forks: 0
Open issues: 0
Stars: 0
Watchers: 0
Credits
F13 Twitter utilises an integrated version of the Twitter API by James Mallison as released under the MIT license.
Last commit: November 18, 2024 - 07:06am
Forks: 798
Open issues: 37
Stars: 1818
Watchers: 1818
No comments on WordPress Plugin: Twitter