Title: Tweets Widget
Author: fossasia
Published: <strong>2016년 8월 27일</strong>
Last modified: 2016년 8월 29일

---

플러그인 검색

이 플러그인은 **최근 3개의 주요 워드프레스 출시와 시험 되지 않았습니다**. 워드프레스의
좀 더 최근 버전으로 이용할 때 더 이상 관리되지 않고 지원되지 않고 호환성 문제가 
있을 수 있습니다.

![](https://s.w.org/plugins/geopattern-icon/tweets-widget.svg)

# Tweets Widget

 작성자: [fossasia](https://profiles.wordpress.org/fossasia/)

[다운로드](https://downloads.wordpress.org/plugin/tweets-widget.1.0.1.zip)

 * [세부사항](https://ko.wordpress.org/plugins/tweets-widget/#description)
 * [평가](https://ko.wordpress.org/plugins/tweets-widget/#reviews)
 *  [설치](https://ko.wordpress.org/plugins/tweets-widget/#installation)
 * [개발](https://ko.wordpress.org/plugins/tweets-widget/#developers)

 [지원](https://wordpress.org/support/plugin/tweets-widget/)

## 설명

Use anonymous Loklak API OR Connect your Twitter account to this plugin and the 
widget will display your latest tweets on your site.

This plugin is compatible with the new **Twitter API 1.1** and provides full **OAuth**
authentication via the WordPress admin area.

### Shortcodes

You can embed tweets in the body of your posts using a WordPress the shortcode `[
tweets]`.

To specify a different user’s timeline add the `user` attribute.
 To override the
default number of 5 tweets add the `max` attribute, e.g:

    ```
    [tweets max=10 user=KhoslaSopan]<h3>Theming</h3>
    ```

For starters you can alter some of the HTML using built-in WordPress features.
 
See [Widget Filters](https://codex.wordpress.org/Plugin_API/Filter_Reference#Widgets)
and [Widgetizing Themes](https://codex.wordpress.org/Widgetizing_Themes)

**CSS**

This plugin contains no default CSS. That’s deliberate, so you can style it how 
you want.

Tweets are rendered as a list which has various hooks you can use. Here’s a rough
template:

    ```
    .tweets {
        /* style tweet list wrapper */
    }
    .tweets h3 {
        /* style whatever you did with the header */
    }
    .tweets ul { 
        /* style tweet list*/
    }
    .tweets li {
       /* style tweet item */
    }
    .tweets .tweet-text {
       /* style main tweet text */
    }
    .tweets .tweet-text a {
       /* style links, hashtags and mentions */
    }
    .tweets .tweet-text .emoji {
      /* style embedded emoji image in tweet */ 
    }
    .tweets .tweet-details {
      /* style datetime and link under tweet */
    }
    ```

**Custom HTML**

If you want to override the default markup of the tweets, the following filters 
are also available:

 * Add a header between the widget title and the tweets with `tweets_render_before`
 * Perform your own rendering of the timestamp with `tweets_render_date`
 * Render plain tweet text to your own HTML with `tweets_render_text`
 * Render each composite tweet with `tweets_render_tweet`
 * Override the unordered list for tweets with `tweets_render_list`
 * Add a footer before the end of the widget with `tweets_render_after`

Here’s an **example** of using some of the above in your theme’s functions.php file:

    ```
    add_filter('tweets_render_date', function( $created_at ){
        $date = DateTime::createFromFormat('D M d H:i:s O Y', $created_at );
        return $date->format('d M h:ia');
    }, 10 , 1 );

    add_filter('tweets_render_text', function( $text ){
        return $text; // <- will use default
    }, 10 , 1 );

    add_filter('tweets_render_tweet', function( $html, $date, $link, array $tweet ){
        $pic = $tweet['user']['profile_image_url_https'];
        return '<p class="my-tweet"><img src="'.$pic.'"/>'.$html.'</p><p class="my-date"><a href="'.$link.'">'.$date.'</a></p>';
    }, 10, 4 );

    add_filter('tweets_render_after', function(){
        return '<footer><a href="https://twitter.com/me">More from me</a></footer>';
    }, 10, 0 );<h3>Caching</h3>
    ```

Responses from the Twitter API are cached for 5 minutes by default. This means your
new Tweets will not appear on your site in real time.

This is deliberate not only for performance, but also to avoid Twitter’s strict 
rate limits of 15 requests every 15 minutes.

You can override the 300 second cache by using the `tweets_cache_seconds` filter
in your theme as follows:

This would extend the cache to 1 minute, which is the lowest value you should consider
using on a live site:

    ```
    add_filter('tweets_cache_seconds', function( $ttl ){
        return 60;
    }, 10, 1 );
    ```

This would disable the cache (not recommended other than for debugging):

    ```
    add_filter('tweets_cache_seconds', function( $ttl ){
        return 0;
    }, 10, 1 );<h3>Emoji</h3>
    ```

If you want to disable Emoji image replacement, you can filter the replacement callback
function to something empty, e.g:

    ```
    add_filter('tweets_emoji_callback', function( $func ){
        return '';
    } );
    ```

 * or to strip Emoji characters from all tweets, return your own replacement function
   that returns something else, e.g:
 * add_filter(‘tweets_emoji_callback’, function( $func ){
    return function( array
   $match ){ return ‘‘; }; } );
 * 
   ### Credits
   
 * Screenshot taken with permission from http://stayingalivefoundation.org/blog
 * Portuguese translations by [Leandro Dimitrio](https://wordpress.org/support/profile/leandrodimitrio)
 * German translations by [Florian Felsing](https://twitter.com/FlorianFelsing) 
   and [David Noh](https://wordpress.org/support/profile/david_noh)
 * Russian translations by [Andrey Yakovenko](https://twitter.com/YakovenkoAndrey)
 * Dutch translations by [Daniel Wichers](https://twitter.com/dwichers)
 * Spanish translations by [Pedro Pica](http://minimizo.com)

### Notes

Be aware of [Twitter’s display requirements](https://dev.twitter.com/terms/display-requirements)
when rendering tweets on your website.

Example code here uses PHP [closures](http://www.php.net/manual/en/class.closure.php)
which require PHP>=5.3.0 and won’t work on older systems.

## 스크린샷

 * [[
 * Tweets rendered via Loklak API
 * [[
 * Admin screen shows Loklak and Twitter API connect button and OAuth settings
 * [[
 * Widget screen shows feed options

## 설치

 1. Unzip all files to the `/wp-content/plugins/` directory
 2. Log into WordPress admin and activate the ‘Tweets’ plugin through the ‘Plugins’
    menu

Once the plugin is installed and enabled you can use Loklak API or bind your plugin
to a Twitter account as follows:

**Use Loklak API**

 1. Tick the ‘Loklak API’ checkbox in API authentication settings.
 2. Click on ‘Save settings’

OR

**Use Twitter 1.1 API**

 1. Register a Twitter application at https://dev.twitter.com/apps
 2. Note the Consumer key and Consumer secret under OAuth settings
 3. Log into WordPress admin and go to Settings > Twitter API
 4. Enter the consumer key and secret and click ‘Save settings’
 5. Click the ‘Connect to Twitter’ button and follow the prompts.

Once your site is authenticated you can configure the widget as follows:

 1. Log into WordPress admin and go to Appearance > Widgets
 2. Drag ‘Tweets’ from ‘Available widgets’ to where you want it. e.g. Main Sidebar
 3. Optionally configure the widget title and number of tweets to display.

## FAQ

  How can I style the widget?

See the ‘Other Notes’ tab for theming information.

  Do I have to register my own Twitter app?

Yes, if you want to use Twitter’s new API 1.1 . If you decide to use loklak.org’s
anonymous API then no need. More info in the ‘Description’ tab.

  How I do know what my Twitter OAuth settings are?

These details are available in the [Twitter dashboard](https://dev.twitter.com/apps)

  What do I put in the third and fourth fields?

Once you’ve populated the first two fields, just click the _Connect_ button and 
follow the prompts.

  What is the “Minimum popularity” field?

Here you can specify a number of retweets and favourites that a tweet must have 
before it’s displayed.
 This is useful for only showing your most interesting content.

  How can I prevent SSL certificate errors?

If you’re unable too fix your [PHP cURL](https://php.net/manual/en/book.curl.php)
installation, you can disable SSL verification of twitter.com by adding this to 
your theme functions.php:
 add_filter(‘https_ssl_verify’, ‘__return_false’); But,
please do so at your own risk.

## 후기

![](https://secure.gravatar.com/avatar/543bfc51f42e886bca82b56409a01b4139a89b8fdea3658a948f5f6a99e47747?
s=60&d=retro&r=g)

### 󠀁[Great initiative!](https://wordpress.org/support/topic/great-initiative/)󠁿

 [shiningwasp](https://profiles.wordpress.org/shiningwasp/) 2016년 9월 3일

Its good to use a plugin which works without twitter OAuth! It simplifies the whole
installation process.

 [ 모든 1 평가 읽기 ](https://wordpress.org/support/plugin/tweets-widget/reviews/)

## 기여자 & 개발자

“Tweets Widget”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이 플러그인에 
기여하였습니다.

기여자

 *   [ fossasia ](https://profiles.wordpress.org/fossasia/)

[자국어로 “Tweets Widget”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/tweets-widget)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/tweets-widget/)는, [SVN 저장소](https://plugins.svn.wordpress.org/tweets-widget/)
를 확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/tweets-widget/)
을 [RSS](https://plugins.trac.wordpress.org/log/tweets-widget/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 변경이력

#### 1.0.1

 * Fixes FAQs
 * Fixes minor URL bugs

#### 1.0

 * A whole new version!

## 기초

 *  버전 **1.0**
 *  최근 업데이트: **10년 전**
 *  활성화된 설치 **20+**
 *  워드프레스 버전 ** 3.5.1 또는 그 이상 **
 *  다음까지 시험됨: **4.5.33**
 *  언어
 * [English (US)](https://wordpress.org/plugins/tweets-widget/)
 * 태그:
 * [loklak](https://ko.wordpress.org/plugins/tags/loklak/)[loklak api](https://ko.wordpress.org/plugins/tags/loklak-api/)
   [oauth](https://ko.wordpress.org/plugins/tags/oauth/)[tweets](https://ko.wordpress.org/plugins/tags/tweets/)
   [twitter](https://ko.wordpress.org/plugins/tags/twitter/)
 *  [고급 보기](https://ko.wordpress.org/plugins/tweets-widget/advanced/)

## 평점

 별 5점 만점에 5점.

 *  [  1/5-별점 후기     ](https://wordpress.org/support/plugin/tweets-widget/reviews/?filter=5)
 *  [  0/4-별점 후기     ](https://wordpress.org/support/plugin/tweets-widget/reviews/?filter=4)
 *  [  0/3-별점 후기     ](https://wordpress.org/support/plugin/tweets-widget/reviews/?filter=3)
 *  [  0/2-별점 후기     ](https://wordpress.org/support/plugin/tweets-widget/reviews/?filter=2)
 *  [  0/1-별점 후기     ](https://wordpress.org/support/plugin/tweets-widget/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/tweets-widget/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/tweets-widget/reviews/)

## 기여자

 *   [ fossasia ](https://profiles.wordpress.org/fossasia/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/tweets-widget/)