全部PHPで書いているので他の言語を使うときは読み替えて下さい。Twitter APIのライブラリはTwistOAuthを使っています。
ここで説明するのは公式のAPIからの取得のみです。作成はここからでは出来ません。出来るのは取得のみです。
公式のキーでログインする必要があります。サードパーティではアンケートの情報が一切入らないためです。
// Twitter for Macのキーでログイン
0039.cf | |
0039.ga | |
0039.ml | |
00b2bcr51qv59xst2.cf | |
00b2bcr51qv59xst2.ga | |
00b2bcr51qv59xst2.ml | |
02466.cf | |
02466.ga | |
02466.ml | |
07819.cf |
#!/bin/bash | |
# ----------------------------------------------------------------------- | |
# Copyright (C) 2013 Matthias Sohn <[email protected]> | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
[{ | |
"created_at": "Fri Feb 08 09:36:04 +0000 2013", | |
"id": 299813838403010560, | |
"id_str": "299813838403010560", | |
"text": "\u753b\u50cfpost\u3066\u3059\u3061 http:\/\/t.co\/49XVeerc", | |
"source": "\u003ca href=\"http:\/\/ksoft.dip.jp\/\" rel=\"nofollow\"\u003ere4k\u003c\/a\u003e", | |
"truncated": false, | |
"in_reply_to_status_id": null, | |
"in_reply_to_status_id_str": null, | |
"in_reply_to_user_id": null, |
// https://api.twitter.com/1.1/search/universal.json?q=tweenq | |
{ | |
"metadata": { | |
"cursor": "TWEET-170606166982930432-299822566774808577" | |
}, | |
"modules": [ | |
{ | |
"status": { | |
"data": { | |
"contributors": null, |
r,s="おちんぽ","";s<<r[rand 4]until s.match r;puts s,"\nおぉぉお゙お゙~っ!!イグゥウ!!イッグゥウウ!!\n\n#{s.size}回目で果てました…" |
Plugin.create(:inmuapi) do | |
[(1..4).to_a, "一二三四".chars].transpose.each do |num, knum| | |
command(:"inmuapi_#{num}", name: "真夏の夜の淫夢 #{knum}章", condition: -> _ { true }, visible: true, role: :postbox) do |opt| | |
res = Net::HTTP.get_response(URI.parse("http://api.yukkurisinai.net/inmu/story/#{num}")) | |
text = JSON.parse(res.body)["Plot"] | |
Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer.text = text | |
end | |
end | |
end |
ぬあのようにあのようにア紫やおおお | |
chi枯れしぼむ・.・(小さな声) | |
MUR大変だった向こう脛ーこんにちは | |
重い。... これ ... ああ、とてもすでに今日、 | |
それがそのようなキツいんすでも、私は好きでしょう、そして辞職するために既に来るために、なんで。何かがぶっとぅです。- | |
どのようにする起こるか〜ナ・トグや〜 | |
彼は移動します -- それは迅速です... | |
ワイシャツすでに…ずぶぬれになります | |
洗面所のケースは、元気を回復します | |
2つのケース |
<?php | |
// PHP 移植バージョン。こっちはもっとデバッグしてないバージョンです。 | |
// @re4k 2012/10/11 | |
class TwitterDevelopers | |
{ | |
private $cookie; | |
private $boundary = "re4kboundary"; | |
private $user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/18.0 Firefox/18.0 FirePHP/0.7.1"; | |
private function request($uri, $type = "GET", $data) |