OSDN Git Service

2ce015b4a816a5defa235acb26c6658727354664
[embrj/master.git] / ajax / list.php
1 <?php\r
2         if(!isset($_SESSION)){\r
3                 session_start();\r
4         }\r
5         include ('../lib/twitese.php');\r
6         $t = getTwitter();\r
7         $t->debug = true;\r
8         if ( isset($_POST['action']) && isset($_POST['id']) ) {\r
9                 if ($_POST['action'] == 'create') {\r
10                         $result = $t->followList($_POST['id']);\r
11                         if ($result) echo 'success';\r
12                         else echo 'error';\r
13                 } else if ($_POST['action'] == 'destory') {\r
14                         $result = $t->unfollowList($_POST['id']);\r
15                         if ($result) echo 'success';\r
16                         else echo 'error';\r
17                 } \r
18         }\r
19         \r
20 ?>\r
21 \r