Hi,
I have implemented the Pinterest Stand Alone API.
But i am keep getting this following error message:
Incorrect Username/Password
But the thing is i have used the correct username and password, and i can log in under Pinterest site with no problem.
I have both OpenSSL and cURL installed as well.
(Quick question: does the API works under localhost)
Here is my code below:
require “postToPinterest.php”;
$email = “xxxxxx”;
$pass = “xxxxxx”;
$msg = ‘Post this to Pinterest!’;
$imgURL = ‘https://www.clipsal.com.au/trade/__data/page/9761/img_clipsal_iselect_app.jpg’;
$link = ‘https://www.clipsal.com.au’;
$boardID = ‘408631434878700655’;
$loginError = true;
echo $email;
echo ‘<br />’;
echo $pass;
echo ‘<br />’;
//phpinfo();
if(!extension_loaded(‘openssl’)){
throw new Exception(‘This app needs the Open SSL PHP extension.’);
}else{
echo ‘openssl is on’;
echo ‘<br />’;
}
function _isCurl(){
return function_exists(‘curl_version’);
}
if(_isCurl()){
echo ‘cURL is on’;
echo ‘<br />’;
}
$boraderInfo = doGetBoardsFromPinterest();
print_r($boraderInfo);
echo ‘<br />’;
$loginError = doConnectToPinterest($email, $pass);
if (!$loginError)
{
echo ‘<br />’;
echo ‘correct password’;
doPostToPinterest($msg, $imgURL, $link, $boardID);
} else echo $loginError;
?>