Hi I was trying to create Pinterest authentication in my Laravel project using this package :
I am using laravel 5.5
And this is the package
I am doing this in my controller as for testing :
$pinterest = new Pinterest(env('PINTEREST_CLIENT_ID'), env('PINTEREST_CLIENT_SECRET'));
$loginurl = $pinterest->auth->getLoginUrl(env('CALLBACK_URL'), array('read_public'));
echo '<a href=' . $loginurl . '>Authorize Pinterest</a>';
Now these values of client_id
, client_secret
and callback
are correct. I have verified them.. I get the screen where it creates an anchor tag with a link but when I click on it, it gives me this error :
{
"status": "failure",
"message": "Something went wrong on our end. Sorry about that.",
"code": 12,
"data": "path: /oauth/\nparams:[('state', [u'21881cf']), ('redirect_uri',
[u'https://bhgre-social.dev/']), ('response_type', [u'code']),
('client_id',
[u'fae8f5c5c5e0d04c9f7a7cf42cbff1d995e6be163cdf922f7deb21a02f37fe7f']),
('scope', [u'read_public']), ('client_secret',
[u'4926501681255951105'])]\ninvalid literal for int() with base 10:
'fae8f5c5c5e0d04c9f7a7cf42cbff1d995e6be163cdf922f7deb21a02f37fe7f'"
}
Yes I know I can not share my client id
and client secret
but the reason is that I think the error shows that there is something wrong with it so..
Its a test account so no worry.