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.

A Twitter Profile Widget

F13 Twitter Profile Widget example

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

  1. Visit https://developer.twitter.com/en/portal/projects-and-apps
  2. Click “+ new project” and fill in the application form
  3. If asked which version of the API to use, select version 1.1
  4. Once completed, copy your Access tokens and API keys to the relevant fields in F13 Admin >> Twitter
F13 Twitter Settngs

F13 Twitter Settings page

WordPress

GitHub

GitHub repository: f13dev/f13-twitter
Created: April 14, 2021 - 05:13am
Last commit: July 28, 2022 - 06:57pm
Forks: 0
Open issues: 0
Stars: 0
Watchers: 0
Description: WordPress Twitter integration. Shortcodes and Widgets.
git clone https://github.com/f13dev/f13-twitter

Credits

F13 Twitter utilises an integrated version of the Twitter API by James Mallison as released under the MIT license.

GitHub repository: J7mbo/twitter-api-php
Created: March 08, 2013 - 03:23pm
Last commit: November 18, 2024 - 07:06am
Forks: 798
Open issues: 37
Stars: 1818
Watchers: 1818
Description: The simplest PHP Wrapper for Twitter API v1.1 calls
git clone https://github.com/J7mbo/twitter-api-php


6 tags for "WordPress Plugin: Twitter"

No comments on WordPress Plugin: Twitter

Share your thoughts

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.