*

ashwrote

  • ***
  • 23 posts
Login button
« on: January 26, 2016, 06:07:54 PM »
I want to show the google connect button on my login page.
where exactly i should paste the code.
i have little knowledge about editing so i am afraid to edit php file, kindly advise exact line number and page where to paste? either it will remove some existing text there or i have to just paste it ?? and will it result in adding a new line or just will be some part of existing line.

My intention to put the button on login page .... where i already have the Login with Facebook button

thanks

*

MB Themes

Re: Login button
« Reply #1 on: January 26, 2016, 06:40:14 PM »
@ashwrote
1) Backup your files
2) Now you can try, test, play, modify, whatever you want

Go to file:
oc-content/themes/patricia/user-register.php

Find code:
Code: [Select]
            <?php if(class_exists('OSCFacebook')) { ?>
              <?php 
                $user 
OSCFacebook::newInstance()->getUser() ;
                if( !
$user or !osc_is_web_user_logged_in() ) {
              
?>


              <div class="fb-box">
                <a class="fb-login" href="<?php echo OSCFacebook::newInstance()->loginUrl(); ?>"></a>
                <span class="fb-load"></span>
              </div>

              <?php ?>
            <?php ?>

Bellow this, paste your code.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

ashwrote

  • ***
  • 23 posts
Re: Login button
« Reply #2 on: January 26, 2016, 07:01:52 PM »
i paste one line below that u guide

and it appear in my Name box

how to make it appear next to facebook button

[attachment deleted by admin]

*

ashwrote

  • ***
  • 23 posts
Re: Login button
« Reply #3 on: January 26, 2016, 07:28:32 PM »
and it gives error
kindly advise

[attachment deleted by admin]

*

MB Themes

Re: Login button
« Reply #4 on: January 26, 2016, 09:08:51 PM »
@ashwrote
Then place your code after line:
Code: [Select]
<span class="fb-load"></span>
Error you describe represents incorrectly set google application.
Please read instruction step by step and do it as described to last point.
People usually read it on the fly and do not do what is written there, and it is very important.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Daniel PM

  • ****
  • 111 posts
Re: Login button
« Reply #5 on: February 17, 2016, 06:25:38 AM »
Hello, I have configured all of Google settings, I get the allow or deny option screen with my Google account looged in, and then, I click allow, and sends me to main page of my site  without login in, same issue with facebook login button, any advice?  thanks.
Daniel PM

*

MB Themes

Re: Login button
« Reply #6 on: February 17, 2016, 08:25:57 AM »
@Daniel PM
Than you probably did not configuret plugin as is described in plugin settings.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Daniel PM

  • ****
  • 111 posts
Re: Login button
« Reply #7 on: February 18, 2016, 09:11:47 PM »
Hi frosticek, I did follow the steps described in the plugin, at first, I got the error of Redirect URI (and the Authorized Javascript Origins & Authorized Redirect URI were identical) ok, after removing and placing like 3 times different urls, with the half hour wait between each one of them, I could get to see the application screen where Google ask for permit, after clicking 'accept', the application takes me back to homepage without login me in. Please give me some advice, thanks.


*************************

400. That’s an error.

Error: redirect_uri_mismatch

Application: losanunciosmx

You can email the developer of this application at: [email protected]

The redirect URI in the request: http://losanuncios.mx/ did not match a registered redirect URI.

Learn more
Request Details

    access_type=offline
    approval_prompt=auto
    hl=es-419
    scope=https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
    response_type=code
    redirect_uri=http://losanuncios.mx/
    client_id=627815369632-19vfphsfo01qepbhuugvrda912ag2s07.apps.googleusercontent.com

That’s all we know.

******************************

http://s12.postimg.org/w9kultdnv/settings.jpg
« Last Edit: February 19, 2016, 06:36:33 AM by Daniel PM »
Daniel PM

*

MB Themes

Re: Login button
« Reply #8 on: February 19, 2016, 07:48:06 AM »
@Daniel PM
This simply means you did not follow all steps from plugin settings. Everything must be done exactly as written.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots