Hi!
I`m developing an APP on facebook, I`m using JFBC for interaction, right now I need to create a quick register page for users, with no login to the system. I tried to find the flow of the registration but I wasnt able to determine where to call the Logout after Login.
The second thought was to allow JFBC do what it does better, and let it Finish the Register, and Login the user, and then when the Joomla web page is loaded again, trigger the Logout button; so i add this PHP script on my component view to trigger the Logout button:
$user = & JFactory::getUser();
if ($user->get('id')!=0){
echo "";
//echo " jfbc.login.logout_button_click();"; //Doesnt Work
echo " document.getElementById('jfbcLogoutButton').click();"; //Still not working
echo "";
}
The problem now, is an error like this: FB is not defined in "com_jfbconnect/includes/jfbconnect.js" Líne: 33. but the Logout button works fine if i click it manually.
What I´m missing here? how the FB object is loaded and more important, how I call the Logout function, so a new user can register Quick and simple?
Thankyou for your help.
Regards Aldo!