-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from plusreed/2.0
Version 2.0
- Loading branch information
Showing
11 changed files
with
251 additions
and
1,243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TW_CONSUMER_API_KEY=""; | ||
TW_CONSUMER_API_SECRET=""; | ||
TW_ACCESS_TOKEN=""; | ||
TW_ACCESS_TOKEN_SECRET=""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
vendor/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2018 Reed Davenport | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
yourownbot-php | ||
================= | ||
**This project is no longer maintained. Compatibility with PHP 7+ is not guaranteed.** <br /> A basic PHP-powered [@yourownbot](https://twitter.com/#!/yourownbot) clone. | ||
# yourownbot-php | ||
|
||
A basic PHP-powered [@yourownbot](https://twitter.com/yourownbot) clone. | ||
|
||
## How to use | ||
|
||
How to use | ||
================= | ||
It's quite easy: | ||
- Make a Twitter account for your bot. | ||
- Go to [apps.twitter.com](http://apps.twitter.com) using that account | ||
- Create a new app | ||
- Set the permissions to Read and Write | ||
- Get your keys, and put them in `SendYourOwnTweet.php` | ||
- Set up a cron job. | ||
Example: | ||
`0,15,30,45 * * * * php /path/to/SendYourOwnTweet.php` | ||
- Enjoy your own bot! | ||
|
||
Changes | ||
================ | ||
If you want to make some changes to this code, feel free. | ||
Some things I wanted to do that you might wanna do too: | ||
- Check the user agent to see if the cron job is accessing it | ||
- Separate word arrays and keys to another file | ||
|
||
1. Make a Twitter account for your bot. | ||
1. Go to [developer.twitter.com/en/apps](https://developer.twitter.com/en/apps) using that account. | ||
1. Create a new app. | ||
1. Set the permissions to Read and Write. | ||
1. Get your keys, and put them in `.env`. | ||
1. Set up a cron job that will run `tweeter.php`. | ||
1. Profit? | ||
|
||
## License | ||
|
||
This project is licensed under the [MIT License](https://github.com/plusreed/yourownbot-php/blob/master/LICENSE). | ||
|
||
[twitteroauth](https://github.com/abraham/twitteroauth) is licensed under the [MIT License](https://github.com/abraham/twitteroauth/blob/master/LICENSE.md). | ||
|
||
[phpdotenv](https://github.com/vlucas/phpdotenv) is licensed under the [BSD 3-Clause License](https://github.com/vlucas/phpdotenv/blob/master/LICENSE.txt). |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"require": { | ||
"abraham/twitteroauth": "^0.9.2", | ||
"vlucas/phpdotenv": "^2.5" | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.