Advertisement:

Author Topic: FCB Improvement  (Read 1202 times)

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
FCB Improvement
« 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:
Code: [Select]
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


Regards,
Eric

itcafeonline

  • Full Member
  • ***
  • Posts: 245
Re: FCB Improvement
« Reply #1 on: May 18, 2015, 06:46:57 am »
SmaRTey - is it possible to pull the Ph number from facebook and store in osclass db as we do with name?

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: FCB Improvement
« Reply #2 on: May 18, 2015, 11:19:58 pm »
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.