2017 © Pedro Peláez
 

library pinterest-pinner

Programmatically create a pin on Pinterest

image

dzafel/pinterest-pinner

Programmatically create a pin on Pinterest

  • Wednesday, March 1, 2017
  • by dzafel
  • Repository
  • 8 Watchers
  • 26 Stars
  • 312 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 17 Forks
  • 0 Open issues
  • 6 Versions
  • 2 % Grown

The README.md

DEPRECATED AND NO LONGER MAINTAINED, however, as of 2017-03-01, this library still works., (*1)

Please see the official Pinterest API., (*2)

PinterestPinner PHP Class

~~Pinterest API is not released yet, so there is no way to programmatically create a pin.~~ So here is this class for - Autoposter, Autopinner, whatever you like to call it., (*3)

This is an unofficial API, and likely to change and break at any moment., (*4)

PinterestPinner is not a way to avoid any Pinterest terms, conditions, rules and regulations. Please use the class in accordance with all Pinterest rules. If you abuse the service you will be banned there., (*5)

Please follow the PSR-2 coding standards if you would like to create a pull request., (*6)

Installation

You can easily install PinterestPinner with the following command:, (*7)

composer require dzafel/pinterest-pinner:2.*, (*8)

or alternatively, include a dependency for dzafel/pinterest-pinner in your composer.json file. For example:, (*9)

{
    "require": {
        "dzafel/pinterest-pinner": "2.*"
    }
}

How to use it?

To add a new pin:, (*10)

try {
    $pinterest = new \PinterestPinner\Pinner;
    $pin_id = $pinterest->setLogin('Your Pinterest Login')
        ->setPassword('Your Pinterest Password')
        ->setBoardID('Pinterest Board ID')
        ->setImage('Image URL')
        ->setDescription('Pin Description')
        ->setLink('Pin Link')
        ->pin();
} catch (\PinterestPinner\PinnerException $e) {
    echo $e->getMessage();
}

You can also get additional info:, (*11)

// Get a list of boards
$boards = $pinterest->getBoards();

// Get a list of pins
$pins = $pinterest->getPins();

// Get logged in user data
$user = $pinterest->getUserData();

Changelog

2.0.7 (2016-09-22)

  • FIX: composer.json version fix

2.0.6 (2016-09-21)

  • FIX: getUserData() should load the user details from tree > data array path instead of resourceDataCache (#21)

2.0.5 (2016-06-11)

  • Added Guzzle 6 support (required: >=5.0)

2.0.4 (2016-03-12)

  • FIX: _responseToArray() now search for config JSON in <script id="jsInit1"> instead of P.main.start() function (#17)

2.0.3 (2015-11-11)

  • FIX: new getBoards() logic, now it returns all boards instead of just first 50 (#16)

2.0.2 (2015-10-05)

  • FIX: typo in init function - P.start.start instead of P.main.start (#15)
  • FIX: getBoards() always returned empty array, because getPins() returned pins collection, not full response json (#15)

2.0.1 (2015-09-23)

  • FIX: init function name changed from P.scout.init to P.main.start (#14)
  • FIX: do preg_match() only if response value is a string
  • NEW: added public $user_data variable
  • NEW: changed some private methods and vars to protected so class can be extended

2.0 (2015-04-09)

  • NEW: Library is now composer friendly
  • NEW: Added Guzzle dependency

1.0.1 (2014-11-02)

  • FIX: reload CSRF token upon login

1.0 (2014-06-04)

  • Initial release

The Versions

01/03 2017

dev-master

9999999-dev

Programmatically create a pin on Pinterest

  Sources   Download

GPL-2.0

The Requires

 

by Paweł Ciesielski

pinterest

22/09 2016

2.0.7

2.0.7.0

Programmatically create a pin on Pinterest

  Sources   Download

GPL-2.0

The Requires

 

by Paweł Ciesielski

pinterest

11/06 2016

2.0.5

2.0.5.0

Programmatically create a pin on Pinterest

  Sources   Download

GPL-2.0

The Requires

 

by Paweł Ciesielski

pinterest

12/03 2016

2.0.4

2.0.4.0

Post to pinterest programatically

  Sources   Download

GPL-2.0

The Requires

 

by Paweł Ciesielski

pinterest

11/11 2015

2.0.3

2.0.3.0

Post to pinterest programatically

  Sources   Download

GPL-2.0

The Requires

 

by Paweł Ciesielski

pinterest

09/04 2015

2.0

2.0.0.0

Post to pinterest programatically

  Sources   Download

GPL-2.0

The Requires

 

by Paweł Ciesielski

pinterest