Osclass forums
Support forums => Plugins => Facebook Connect => Topic started by: SmaRTeY on May 18, 2015, 12:01:44 am
-
Hi,
the facebook plugin uses a hook 'before_html' which is imo not needed in ALL pages since you will most likely ONLY use this login in your user-login form.
For this purpose I changed a function in index.php:
function fbc_init() {
//Let's check if we're on login page, if not no need for init
if(osc_is_login_form()) {
$facebook = OSCFacebook::newInstance()->init();
}
}
This will speed up your site as the init will only run when on login page AND it also enables a decent redirect as mentioned in this thread:
http://forums.osclass.org/plugins/redirect-to-'url'-after-login-with-facebook/msg122038/#msg122038 (http://forums.osclass.org/plugins/redirect-to-'url'-after-login-with-facebook/msg122038/#msg122038)
Regards,
Eric
-
SmaRTey - is it possible to pull the Ph number from facebook and store in osclass db as we do with name?
-
Hi itcafeonline,
to be honest I have no idea ???
It would depend on Facebook api, if phone is available my guess is it will be possible.