Skip to content

Commit

Permalink
Merge pull request #5 from plusreed/2.0
Browse files Browse the repository at this point in the history
Version 2.0
  • Loading branch information
plusreed authored Dec 24, 2018
2 parents 31ca19a + 0736e86 commit 929a796
Show file tree
Hide file tree
Showing 11 changed files with 251 additions and 1,243 deletions.
4 changes: 4 additions & 0 deletions .env.example
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="";
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
.env
21 changes: 21 additions & 0 deletions LICENSE
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.
50 changes: 0 additions & 50 deletions LICENSE.md

This file was deleted.

42 changes: 21 additions & 21 deletions README.md
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).
36 changes: 0 additions & 36 deletions SendYourOwnTweet.php

This file was deleted.

6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"require": {
"abraham/twitteroauth": "^0.9.2",
"vlucas/phpdotenv": "^2.5"
}
}
122 changes: 122 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 929a796

Please sign in to comment.