php - Login button not disappearing after login -
i have began learn php , i'm working on facebook app @ moment. problem facing login button remains on screen after user has accessed account. have explination this? here code:
<?php if (isset($user_profile)) { ?> user logged in <?php } else { ?> <div class="fb-login-button" data-scope="email"></div> <?php } ?>
i included file $user_profile defined $user_profile = $facebook->api('/me');
test output of $user_profile using var_dump( $user_profile ) command. add exit command after var_dump pause execution. code sample else block being run meaning there issue $user_profile variable.
Comments
Post a Comment