- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Plan
Premium
Fr
Device
Macbook Pro mid 2014
Operating System
MacOs Big Sur 11.4
My Question or Issue
I'm bulding a PHP/Symfony app which uses the WebAPI.
So I perform the first step to initiate the dialog with the API :
$state = $session->generateState();
$options = [
'scope' => [
'playlist-read-private',
'user-modify-playback-state',
'user-read-playback-state',
],
'state' => $state,
'show_dialog' => true
];
$_SESSION['scope']=serialize($options['scope']);
$_SESSION['state']=$state;
// finally all data of the session are stored in a session variable
echo $session->getAuthorizeUrl($options);
header('Location: ' . $session->getAuthorizeUrl($options));
die();
And so the user is redirected to the page where he has to authorize or not the app to access his data. There are two buttons on this page : one accept button and one cancel button.
The issue is with the accept button : it does work once. After that if the user comes back on the page, the button is non more active. I mean if you click on the button nothing happens.
I tried changing the option "showdialog" to false. Here's what happens when doing so : the first time after the change the button works, the second time and the other times it fails... Same behaviour when I change from false to true...
Any idea?
Solved! Go to Solution.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page