seregazhuk / pinterest-bot
PHP library for Pintrest
Installs: 58 505
Dependents: 0
Suggesters: 0
Security: 0
Stars: 404
Watchers: 48
Forks: 125
Open Issues: 38
Type:package
Requires
- php: >=7.0
- ext-curl: *
- ext-fileinfo: *
Requires (Dev)
- codeclimate/php-test-reporter: ^0.4
- mockery/mockery: 1.0
- phpunit/phpunit: ~6.5
- dev-master
- v5.9.1
- v5.9.0
- v5.8.2
- v5.8.1
- 5.8.0
- 5.7.3
- 5.7.2
- 5.7.1
- 5.7.0
- 5.6.9
- 5.6.8
- 5.6.7
- 5.6.6
- 5.6.5
- 5.6.4
- 5.6.3
- 5.6.2
- 5.6.1
- 5.6.0
- 5.5.9
- 5.5.8
- 5.5.7
- 5.5.6
- 5.5.5
- 5.5.4
- 5.5.3
- 5.5.2
- 5.5.1
- 5.5.0
- 5.4.5
- 5.4.4
- 5.4.3
- 5.4.2
- 5.4.1
- 5.4.0
- 5.3.11
- 5.3.10
- 5.3.9
- 5.3.8
- 5.3.7
- 5.3.6
- 5.3.5
- 5.3.4
- 5.3.3
- 5.3.2
- 5.3.1
- 5.3.0
- 5.2.7
- 5.2.6
- 5.2.5
- 5.2.4
- 5.2.3
- 5.2.2
- 5.2.1
- 5.2.0
- 5.1.7
- 5.1.6
- 5.1.5
- 5.1.4
- 5.1.3
- 5.1.2
- 5.1.1
- 5.1.0
- 5.0.1
- 5.0.0
- 4.13.3
- 4.13.2
- 4.13.1
- 4.13.0
- 4.12.7
- 4.12.6
- 4.12.5
- 4.12.4
- 4.11.3
- 4.11.2
- 4.11.1
- 4.11.0
- 4.10.1
- 4.10.0
- 4.9.0
- 4.8.0
- 4.7.0
- 4.6.1
- 4.6.0
- 4.5.4
- 4.5.3
- 4.5.2
- 4.5.1
- 4.5.0
- 4.4.2
- 4.4.1
- 4.4.0
- 4.3.0
- 4.2.2
- 4.2.1
- 4.2.0
- 4.1.0
- 4.0.0
- 3.3.1
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.0
- 3.0.0
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.2
- 2.3.1
- 2.2.1
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.0
- 1.0.1
- 1.0.0
- 0.8.3
- 0.8.2
- 0.8.1
- 0.8
- 0.7.3
- 0.7.2
- v0.7.1
- v0.7
- v0.6
- v0.5.1
- v0.5
- v0.4
- v0.3
- v0.2
- v0.1
- dev-prepare-release
- dev-allow-edit-title-of-the-pin
- dev-add-support-for-reach-pins
- dev-password-rest-fix
- dev-pinners-is-followed-by-me
- dev-login-requirements-for-pinners
- dev-request-refactoring
- dev-develop
This package is auto-updated.
Last update: 2021-01-07 17:26:06 UTC
README
A PHP library to help you work with your Pinterest account without API credentials.
The Pinterest API is painful: receiving an access token involves registering a developer account, registering an application, then waiting for confirmation. Not to mention, the public API itself is poorly implemented and has a limited set of features.
This library offers the full functionality available on Pinterest's website, with no need to register an application to receive an access token. All that's needed is your account login information (but even this is not required if you don't plan on creating pins, writing comments or sending messages)!
- Installation
- Quick Start
- How to avoid ban
- Examples
- Account
- Boards
- Pins
- Pinners
- Interests and topics
- Search
- Inbox
- Keywords
- Error handling
- Use proxy
- Custom request settings
- Cookies
- Pagination
Installation
Dependencies
Library requires CURL extension and PHP 7.0 or above.
The recommended way to install this library is via Composer. New to Composer?
composer require seregazhuk/pinterest-bot
Quick Start
// You may need to amend this path to locate Composer's autoloader require('vendor/autoload.php'); use seregazhuk\PinterestBot\Factories\PinterestBot; $bot = PinterestBot::create(); // Login $bot->auth->login('mypinterestlogin', 'mypinterestpassword'); // Get lists of your boards $boards = $bot->boards->forUser('yourUserName'); // Create a pin $bot->pins->create('http://exmaple.com/image.jpg', $boards[0]['id'], 'Pin description');
Note: Some methods (e.g. get user followers/following, pins likes/dislikes, search and other feed queries) use Pinterest navigation through results (with bookmarks). This means that for every batch of results, a call is made to Pinterest and a Pagination object with Pinterest API results is returned.
How to avoid ban
To avoid being banned by Pinterest, do not aggressively pin or write comments (e.g. creating hundreds of pins in a single minute).
Do this by inserting timeouts (sleep($seconds)
) with calls.
Examples
These articles provide examples of common tasks that can be performed with the bot:
- Automate pinning (source code)
- Multiple Accounts and Proxy (source code)
- Comments, Likes And Repins (source code)
- Followers (source code)
- Parsing Pins (source code)
How can I thank you?
Why not star this GitHub repo? I'd love the attention! Or, you can donate to my project on PayPal:
Thanks!