My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

SweetPlurk (甜不浪) 是一個簡單的 Plurk API 包裝套件,讓 PHP 開發者可以容易地在應用程式裡加入 Plurk 支援。

未來將會加入更簡單的 Plurk 資料操作功能。

執行環境:

  • PHP 5.2.9 以上版本
  • CURL

使用範例:

<?php
require_once 'SweetPlurk/Go.php';
define('APP_ROOT_PATH', dirname(__FILE__));

$apiKey = 'your_api_key';
SweetPlurk_Go::init(array(
    'apiKey' => $apiKey,
    'cookiePath' => APP_ROOT_PATH . "/tmp/$apiKey.txt",
))
    ->login('user1', 'pass1$')
    ->addPlurk('message 1')
    ->addResponse('response 1')
    ->login('user2', 'pass2$')
    ->addPlurk('message 2')
    ->addResponse('response 2');

補充

Plurk 官方目前建議採用 php-plurk-api ,大家可以試試看。

Powered by Google Project Hosting