Automate posting to Pinterest with PHP

Discussion in 'PHP' started by ironmankho, Jan 5, 2013.

  1. #1
    I currently have a site that generates user-created images via php ImageMagick. While we're all waiting for the arrival of the new Pinterest API, is there a way to automate the posting of these user-created images to my own Pinterest account?

    I'm looking for a way to not only autofill the form elements used by the PinIt button but to automatically submit the user-created images to my Pinterest account.
     
    ironmankho, Jan 5, 2013 IP
  2. MockA

    MockA Greenhorn

    Messages:
    14
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    5
    #2
    $p = new Pinterest_API();
    $p->fetch_access_token($client_id, $client_secret, $username, $password);
    $resp = $p->upload_pin(array(    'board' => $board_id,    'details' => 'another test',    'image' => "@".realpath('../img/37.jpg') ));
    PHP:
    You can download the class on GitHub
    github DOT com/kellan/pinterest.api.php/blob/master/pinterest.api.php
     
    MockA, Jan 6, 2013 IP
  3. ironmankho

    ironmankho Active Member

    Messages:
    393
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Great work figuring out the API, but can you clarify a little more on client ID & secret? Do they uniquely identify a user or an authorized app?
     
    ironmankho, Jan 7, 2013 IP