1.Install SimpleJSON
Ans: easy_install simplejson ,它會自動Download 到你的Python 目錄去
2.Download plurkapi ,Copy plurkapi.py 到 D:\Python26\Lib (這是我的python 目錄)
plurkapi download location
3.因為無法發中文,看來應該是沒宣告Coding ,所以在 plurkapi.py 加入
# *- coding: UTF-8 -*-
4.Sample Code 做法:
# *- coding: UTF-8 -*-
import plurkapi
import sys
# Create an API object.
# Pass in your own username and password to the "login" method.
#
plurk_api = plurkapi.PlurkAPI()
if plurk_api.login('nickname', 'password') == False:
print "Login failed!"
sys.exit(1)
plurk_api.addPlurk(lang='tr_ch',qualifier='says',content='中文化Say Hello 222222!!!')
沒有留言:
張貼留言