-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsendlojax.php
42 lines (40 loc) · 1.28 KB
/
sendlojax.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
require 'class.php';
try {
$twitter = new Twitter();
} catch (Exception $e) {
//ログインしてなかったときの処理
Authering::Redirect();
}
//投稿系の処理。
if (isset($_POST['tweet'])) {
if ($twitter->config['footer'] && !$_POST['id']) {
$tweet = $_POST['tweet'] . ' ' . $twitter->config['footer'];
} else {
$tweet = $_POST['tweet'];
}
$tweet = aa($tweet);
$twitter->Tweet('tweet', array('tweet' => $tweet, 'id' => $_POST['id']));
} else if (isset($_POST['retweet'])) {
$twitter->Tweet('retweet', array('id' => $_POST['retweet']));
} else if (isset($_POST['fav'])) {
$twitter->Tweet('fav', array('id' => $_POST['fav']));
} else if (isset($_POST['fav_dest'])) {
$twitter->Tweet('fav_dest', array('id' => $_POST['fav_dest']));
} else if (isset($_POST['destroy'])) {
$twitter->Tweet('destroy', array('id' => $_POST['destroy']));
} else if (isset($_POST['follow'])) {
$twitter->Tweet('follow', array('user_id' => $_POST['follow']));
} else if (isset($_POST['remove'])) {
$twitter->Tweet('remove', array('user_id' => $_POST['remove']));
} else {
echo 'error :request empty';
exit;
}
$status = $twitter->api;
if ($status->http_code == 200) {
echo 'OK';
} else {
echo 'error:' . $status->http_code;
}
?>