質問編集履歴
2
ポートを8000にした理由を加筆
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
```
|
|
23
23
|
と実行してからhttp://localhost:8000を開きました
|
|
24
24
|
###試したこと
|
|
25
|
+
色々調べると多くのサイトが指定していたポート8000番に接続しました
|
|
26
|
+
ドットインストール http://dotinstall.com/lessons/basic_php_v2/34103
|
|
27
|
+
Qiita http://qiita.com/higuma/items/b23ca9d96dac49999ab9
|
|
28
|
+
goo質問1 http://oshiete.goo.ne.jp/qa/6213862.html
|
|
29
|
+
PHP manual http://php.net/manual/ja/features.commandline.webserver.php
|
|
30
|
+
|
|
25
31
|
localhostや127.0.0.1にはアクセスできました
|
|
26
32
|
色々ググりましたがlocalhostに接続できてlocalhost:8000に接続できない例はありませんでした。
|
|
27
33
|
twitter.phpの中身はhttp://qiita.com/tsunet111/items/9309801cd3e3bcf6e32aこのサイトを参考に
|
1
twitter\.phpの中身を追加
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -24,7 +24,26 @@
|
|
|
24
24
|
###試したこと
|
|
25
25
|
localhostや127.0.0.1にはアクセスできました
|
|
26
26
|
色々ググりましたがlocalhostに接続できてlocalhost:8000に接続できない例はありませんでした。
|
|
27
|
+
twitter.phpの中身はhttp://qiita.com/tsunet111/items/9309801cd3e3bcf6e32aこのサイトを参考に
|
|
28
|
+
```
|
|
29
|
+
<?php
|
|
27
30
|
|
|
31
|
+
//OAuthライブラリ読み込み
|
|
32
|
+
require "twtteroauth/autoload.php";
|
|
33
|
+
use Abraham\TwitterOAuth\TwiiterOAuth;
|
|
34
|
+
|
|
35
|
+
$consumerKey="2uuSjMd6C4gyasaHv1h1OST6A";
|
|
36
|
+
$consumerSecret ="bmI2mi7oO1nYtSau7Y5mh60xhj9C4F5qcpcKILM0da7geKMvMC";
|
|
37
|
+
$accessToken="631281120-rPHrL6ugonfbw9UeGH3Ap8NC4xhBWR1mXLFBX7Pf";
|
|
38
|
+
$accessTokenSecret="5oFXMH4HmhhumkheyyIPze2SqNm9LJ1fi7ZNV0wXSDBaw";
|
|
39
|
+
|
|
40
|
+
$connection=new TwitterOAuth($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
|
|
41
|
+
$res=$connection->post("statuses/update",array("status"=>"testmessage"));
|
|
42
|
+
|
|
43
|
+
var_dump($res);
|
|
44
|
+
```
|
|
45
|
+
カレントディレクトリには他のサイトの情報を元に作った別のindex.phpやtwitteroauthなんかがあります。
|
|
46
|
+
|
|
28
47
|
###補足情報(言語/FW/ツール等のバージョンなど)
|
|
29
48
|
centOS6.8
|
|
30
49
|
chrome 51.0.2704.103 m
|