Following code checks if user is logged in using facebook connect if not when user clicks on check box the code opens facebook to input username and password to connect with facebook. The problem i am having is if user clicks on checkbox and gives acces to facebook connect the code does not update under i refresh the page. Is there a way to update this code if user login on facebook without refreshing page?
if($user['oauth'] != "facebook")
<input type="checkbox" name="fb_post_1" id=\"fb_post_1" value="1" onclick = "facebookPermissionsGrant(); return false;" >