Linux 软件免费装
Banner图

Twitter Widget by Campaign Kit

开发者 elevate360
campaignkit
更新时间 2018年8月8日 06:03
捐献地址: 去捐款
PHP版本: 5.4 及以上
WordPress版本: 4.9.8
版权: GNU General Public License v2.0 (or later)
版权网址: 版权信息

标签

widget sidebar shortcode twitter tweets api rest tweet oauth latest-tweets

下载

1.0.0 1.0.1 1.0.3

详情介绍:

Looking for the easiest way to display tweets on your WordPress site? The Campaign Kit Twitter widget allows you to display a stream of your recent tweets, with images hash and cash tags and a link to the original tweet. You can also display the Twitter account banner and a follow me link. Easy to use by using widget, function or shortcode. Flexible and extendable. Features Parse data from the Twitter API: Credits Twitter Widget by Campaign Kit bundles the following third-party resources: Code inspired by Get Tweets in PHP and Latest Tweets Widget.

安装:

Minimum Requirements Automatic installation Automatic installation is the easiest option as WordPress handles the file transfers itself and you don’t need to leave your web browser. To do an automatic install of the plugin, log in to your WordPress dashboard, navigate to the Plugins menu and click Add New. In the search field type “Twitter Widget by Campaign Kit” and click Search Plugins. Once you’ve found our plugin you can view details about it such as the point release, rating, and description. Most importantly, of course, you can install it by simply clicking “Install Now” and click “Activate”. Manual installation The manual installation method involves downloading our Twitter plugin and uploading it to your web server via your favorite FTP application. The WordPress codex contains instructions on how to do this here. Configure Twitter API
  1. Go to the My applications page on the Twitter website to set up your website as a new Twitter application. You may need to log-in using your Twitter username and password.
  2. If you don't already have a suitable application that you can use for your website, set one up on the Create an Application page.
  3. After clicking Create your Twitter application, on the following page, click on Create my access token.
  4. Copy the Consumer key, Consumer secret, Access token and Access token secret from your Twitter application page into Campaign Kit Twitter Admin Setting.
  5. Click on Save Changes.
Using Widget Using Shortcode You can insert Twitter feed into your post by using a shortcode: [ck_tweets] Shortcode parameter: Example usage : [ck_tweets screen_name="campaignkitau" count="3"] This will display three latest tweets from @campaignkitau. Advanced Usage For some reason, you might want to design your own Twitter markup and design to match your theme. You can build your own twitter markup by using following code: campaignkit_twitter_get_tweets( $args ); // or CampaignKitTwitter\Tweets:get_tweets( $args ); This function will return all the data within an array. Example usage: $args = [ 'screen_name' => 'campaignkitau', 'count' => '3', ]; $tweets = campaignkit_twitter_get_tweets( $args ); foreach( $tweets as $tweet ) { echo wpautop( $tweet['ck_html_text'] ); } // print_r( $tweets ) to see all the complete list of Twitter API data. We also include custom properties between the output (not officially from Twitter API):

屏幕截图:

  • Campaign Kit - Twitter API settings panel.
  • Campaign Kit - Twitter widget.
  • Campaign Kit - Twitter widget display.

升级注意事项:

None

常见问题:

What options can I use for the shortcode?

All the options are listed on the plugin installation page.

How to disable style and script

You can simply add this function into your theme functions:

  • add_filter( 'campaignkit_twitter_load_style', '__return_false' ) to disable any styles from this plugin.
  • add_filter( 'campaignkit_twitter_load_script', '__return_false' ) to disable any scripts from this plugin.

How to build my own Twitter markup?

You can learn more at plugin installation page.

更新日志:

1.0.3 1.0.2 1.0.1 1.0.0 Initial release