An open API service indexing awesome lists of open source software.

https://github.com/yukihirai0505/twitter-bot-sample

A sample project to start twitter bot with php
https://github.com/yukihirai0505/twitter-bot-sample

bot php

Last synced: 21 days ago
JSON representation

A sample project to start twitter bot with php

Awesome Lists containing this project

README

          

# twitter_bot

Twitterのdeveloper画面でアプリを作成

[https://apps.twitter.com/](https://apps.twitter.com/)

PHPでTwitterBotのサンプルを作成(勉強会用)

まずは記録しておいた

- Consumer Key (API Key)
- Consumer Secret (API Secret)
- Access Token
- Access Token Secret

をconfig.phpに記述していきます。

```config.php

$messages[$random].'[固定メッセージ]'
);
$result = $conn->post('statuses/update',$params);
```

あとはbot.phpを実行すればAPIを通じてTwitterに投稿することができるようになります。

```
php bot.php
```