Title: Bit.ly Shortlinks Multisite (Uses OAuth 2 API)
Author: Denis Lam
Published: <strong>2013 年 3 月 15 日</strong>
Last modified: 2013 年 7 月 2 日

---

搜尋外掛

![](https://ps.w.org/bitly-shortlinks-multisite/assets/banner-772x250.png?rev=682311)

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/bitly-shortlinks-multisite.svg)

# Bit.ly Shortlinks Multisite (Uses OAuth 2 API)

 由 [Denis Lam](https://profiles.wordpress.org/spiffyd/) 開發

[下載](https://downloads.wordpress.org/plugin/bitly-shortlinks-multisite.1.2.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/bitly-shortlinks-multisite/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/bitly-shortlinks-multisite/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/bitly-shortlinks-multisite/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/bitly-shortlinks-multisite/#developers)

 [技術支援](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/)

## 外掛說明

WordPress generates shortlinks for your posts and pages. By default it uses the `?
p=` with the post ID added to it, but if you have a rather long domain name this
isn’t very useful. If you use [Bit.ly](http://bit.ly), this plugin will help you
replace the shortlink WordPress generates with a proper Bit.ly shortlink.

This plugin uses the latest Bit.ly OAuth 2 draft specification API instead of its
deprecated V3 API and enables you to use generic access token to automatically enable
Bit.ly shortlinks in your entire multisite network without the need for each site
user to have to tinker with any settings or authentication configurations.

## 螢幕擷圖

[⌊Screenshot of Bit.ly shortlinks in action.⌉⌊Screenshot of Bit.ly shortlinks in
action.⌉[

Screenshot of Bit.ly shortlinks in action.

## 安裝方式

 1. Upload the `plugin` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Insert this code to define your bit.ly generic access token in your `wp-config.
    php` at the end right above “That’s all, stop editing! Happy blogging.”:
 4. define(‘BITLY_ACCESS_TOKEN’, ‘your_generic_access_token_goes_here’);

You can get your generic access token here: [https://bitly.com/a/oauth_apps](https://bitly.com/a/oauth_apps)

#### Multisite Installation

Install and set up your access token the same way as a single site installation 
but make sure you Network Activate the plugin.

#### How To Call Bitly Shortlinks In Your Templates

I’ve included the function `get_bitly($url)` to help developers easily shorten URLs
in their templates.

_Example Usage:_

    ```
    <?php
        $url = 'http://YourLongURL.com';
        echo get_bitly($url); // display your shortened URL
    ?>
    ```

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Bit.ly Shortlinks Multisite (Uses OAuth 2 API)〉的開發相關
工作。

參與者

 *   [ Denis Lam ](https://profiles.wordpress.org/spiffyd/)

[將〈Bit.ly Shortlinks Multisite (Uses OAuth 2 API)〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/bitly-shortlinks-multisite)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/bitly-shortlinks-multisite/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/bitly-shortlinks-multisite/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/bitly-shortlinks-multisite/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/bitly-shortlinks-multisite/)。

## 變更記錄

#### 1.2

 * Fixed bug that occurs when `WP_ DEBUG` is on (Thanks to Luke Childs for the bug
   find.)

#### 1.1

 * Added `get_bitly()` function.

#### 1.0

 * Initial release.

## 中繼資料

 *  版本 **1.2**
 *  最後更新 **13 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 3.0 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.5.2**
 *  語言
 * [English (US)](https://wordpress.org/plugins/bitly-shortlinks-multisite/)
 * 標籤:
 * [bitly](https://tw.wordpress.org/plugins/tags/bitly/)[multisite](https://tw.wordpress.org/plugins/tags/multisite/)
   [shortlink](https://tw.wordpress.org/plugins/tags/shortlink/)[shortlinks](https://tw.wordpress.org/plugins/tags/shortlinks/)
   [url shortener](https://tw.wordpress.org/plugins/tags/url-shortener/)
 *  [進階檢視](https://tw.wordpress.org/plugins/bitly-shortlinks-multisite/advanced/)

## 評分

 3.7 星，滿分為 5 星

 *  [  2 個 5 星使用者評論     ](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/reviews/?filter=2)
 *  [  1 個 1 星使用者評論     ](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/reviews/?filter=1)

[撰寫評分](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/reviews/)

## 參與者

 *   [ Denis Lam ](https://profiles.wordpress.org/spiffyd/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/bitly-shortlinks-multisite/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](http://denislam.com/)