PR

WordPress 更新情報をツイート

WordPressの様々な更新に応じて自動的にTwitterにツイートしてくれるプラグイン。(表示する方法はpc.casey.jp » Twitterを表示するを参照)設定方法が既に解説しているサイトと異なるようなので、新しい設定方法を記載しておく。

インストール

インストールはページ下部のダウンロードまたはWordPress上から簡単にインストールできる。有効化する。

Twitter now requires authentication by OAuth. You will need you to update your settings in order to continue to use WP to Twitter. と設定するように表示が出るので、設定画面を開く。

スポンサードリンク

設定

設定画面にはTwitterとの接続手順が書かれている。

* If you’re not currently logged in, use the Twitter username and password which you want associated with this site
* Your Application’s Name will be what shows up after “via” in your twitter stream; previously, “WP to Twitter.” Your application name cannot include the word “Twitter.” I suggest using the name of your web site.
* Your Application Description can be whatever you want.
* Application Type should be set on Browser
* The Callback URL should be https://pc.casey.jp
* Default Access type must be set to Read & Write (this is NOT the default)

上記情報を参考にしながら登録していく。

同意するか尋ねられる。このあと Unable to register this application. Try typing the CAPTCHA again. などと表示されたら項目を確認してやり直し。

正常に登録できた。ちなみにアプリケーション名に「Twitter」という語句が含まれていると登録できないので、WP to Twitter を WordPressToTweetとしてみた。

カスタマーキー、カスタマーシークレットをWordPressの設定画面にコピーアンドペーストする。

画面右側のナビゲーションから、MyAccessTokenを開く。

AccessTokenとAccessTokenSecretをWordPressの設定画面にコピーアンドペーストする。

設定が完了したら接続してみる。

設定が正しく完了した表示。(WP to Twitter is now connected with Twitter.と書かれていればOK。認証できないときは OAuth Authentication Failed. Check your credentials and verify that Twitter is running. となる。)

投稿した様子

URLが無いぞ。設定からURL短縮をしないにしたら表示できた。URL短縮にもそれぞれAPIキーが必要なようだが、デフォルトで使用するになっているので注意が必要だ。また、これだと何がどの様の更新されたかわからない#title#くらいは入れておきたいところ。あれ?これは標準で入っているな。バグかな。日本語は無理なのだろうか。#post#を追加してみるとこちらは表示された。

// 標準でUpdate(新規のほか、更新時)にもTweetするようになっているので、頻繁にUpdateする場合は適宜設定が必要だ。

様々な設定ができる

スクリーンショットとあわせて参考にして欲しい。

* #title#: the title of your blog post
* #blog#: the title of your blog
* #post#: a short excerpt of the post content
* #category#: the first selected category for the post
* #date#: the post date
* #url#: the post URL
* #author#: the post author

スクリーンショット

//やっぱり無限ループあるよね・・・Twitterへの大量投稿すみませんでした – 原因はWordPressへのインポート | CAPH TECH

参考文献

日本語化

ダウンロード

コメント