Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Plurk OAuth implementation in Lua
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
LuaPlurk.lua Verification update: Alerts


This is a Plurk OAuth implementation based on Lua. Ignacia's LuaOAuth is used to do the OAuth1.0 part.

Lua packages dependencies

Lua 5.1.4

LuaOAuth by Ignacio:

LuaOAuth supports two modes of operation: "synchronous" and "asynchronous" mode. So far LuaPlurk support only synchronous mode. Check out LuaOAuth for more package dependencies.

Usage and examples

To request token:

papi = require "LuaPlurk"
local ret, rtoken, rtoken_secret = papi.init(app_key, app_secret)
local aurl = papi.getAuthorizedUrl(rtoken)

Prompt user to authorize

print("Enter PIN verifier:")
local verifier = assert("*n"))
verifier = tostring(verifier)
local access_token, access_token_secret = papi.getAccessToken(rtoken, rtoken_secret, verifier)

To access Plurk API, use init_client if you already has access token

papi.init_client(app_key, app_secret, token, token_secret)
local api_url = '/APP/Profile/getPublicProfile'
local api_args = {user_id='whoever'}
local response_code, response_headers, response_status_line, response_body =
    papi.plurkRequest(api_url, api_args)


Plurk API:


dkjson by David Kolf, (The JSON4Lua cannot decode empty '[]' in json string.)


2011, Sep. 8: Upload first LuaPlurk and go V0.1.


  • Add token expiration check.
  • Verify LuaPlurk on each API.
    • Complete: Profile, Cliques, FriendsFans, Timeline(except UploadPicture), Alerts

Known issues

  • /APP/Timeline/uploadPicture not work since LuaOAuth does not support multipart/form-data.
Something went wrong with that request. Please try again.