Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CONTRIBUTION Social Login with Facebook / Google 2.3.1/2


thejudge99

Recommended Posts

Social login with facebook / google support thread

 

Ive written a Login module - one that doesnt first pass customer infomation on to a third party .

 

Using

 

Facebook 3.1.1 OAuth 2.0

Google Oauth 2.0

 

The scripts will automatically log existing customers ( providing email + first + lastname are the same)

or automatically sign up new customers.

 

Someone attempting to signup / login with an existing email that has different first / last names will fail.

 

Contribution link comes soon

Link to comment
Share on other sites

Can you please help me?

 

I get an error if I click on the FB-Login Panel. :

 

 

Fatal error: Uncaught exception 'Exception' with message 'Facebook needs the CURL PHP extension.' in /data/multiserv/users/150860/projects/2136783/www/catalog/includes/classes/base_facebook.php:19 Stack trace: #0 /data/multiserv/users/150860/projects/2136783/www/catalog/includes/classes/facebook.php(17): require_once() #1 /data/multiserv/users/150860/projects/2136783/www/catalog/includes/login-facebook.php(3): require('/data/multiserv...') #2 /data/multiserv/users/150860/projects/2136783/www/catalog/login.php(28): require('/data/multiserv...') #3 {main} thrown in /data/multiserv/users/150860/projects/2136783/www/catalog/includes/classes/base_facebook.php on line 19

 

can you help me? :S

Link to comment
Share on other sites

<p>when you set up the facebook Website with Facebook Login ( 5) did you enter a valid domain?

 

if you are using SSL you must enter https://MY_DOMAIN.COM or http://MY_DOMAIN.COM if you are not using SSL.

 

This Domain should be identical to whats passed to facebook as a redirect URL.

 

To test open

 

inludes/login-facebook.php

 

find (near the bottom)

 

$loginUrl   = $facebook->getLoginUrl($params); // generate the url and redirect the browser to it

 

insert above

 

echo tep_href_link(FILENAME_LOGIN, 'oauth_provider=facebook', 'SSL');
exit();

 

this will return something like

http (s) ://MY_DOMAIN.COM/login.php?oauth_provider=facebook

Edited by thejudge99
Link to comment
Share on other sites

Added a small update which performs other things that should happen during a login.

 

E.g Wishlist contribution needs to reload the wishlist as well as the cart.

 

open

 

inludes/login-facebook.php
googleloader.php

 

find ( in Both )

 

$cart->restore_contents();

 

add below

 

// restore wishlist to sesssion
$wishList->restore_wishlist();
// here continue with anything else that needs doing after a successfull login

 

Followed by anything else that should happen after a successful login

 

The new login package contains this same information - so no need to post a new link

 

Jules

Link to comment
Share on other sites

and obviously delete the 2 lines after testing

 

Jules

 

Thanks for your suggestion.

I add them and can get it:

 

this will return something like

 

http (s) ://MY_DOMAIN.COM/login.php?oauth_provider=facebook

 

 

But I still can't login using FB.

Link to comment
Share on other sites

taking 1 step back.

 

make sure that you have

 

1) Created your facebook app

2) Got a set of keys

3) Inserted said keys into includes/fbconfig.php

 

after that is ok can you look to make sure domain is correct

 

Dears,

Would you please help to give some suggestion?

 

we are not using login button at root domain. we put our fb login button at: www.mydomainname.com/anotherdirectory.php

 

Please kindly see the attached FB setting.

post-186794-0-20225200-1344868480_thumb.jpg

Edited by sunrise99
Link to comment
Share on other sites

Remove the Hosting URL

Remove the App Domains

 

and for Site URL enter ONLY the domain http://ovizun.com

no trailing slash at the end - no actual page - ONLY THE DOMAIN ( as per my given instructions )

 

If you are using that for other things as well which requires the other setting filled out then create a new app specifically for logging in.

 

Jules

Link to comment
Share on other sites

Remove the Hosting URL

Remove the App Domains

 

and for Site URL enter ONLY the domain http://ovizun.com

no trailing slash at the end - no actual page - ONLY THE DOMAIN ( as per my given instructions )

 

If you are using that for other things as well which requires the other setting filled out then create a new app specifically for logging in.

 

Jules

 

Many thanks for your suggestion. We create one new ID and update code. still can't login it.

 

Please see our new setting on FB.

post-186794-0-63636800-1345348151_thumb.jpg

Edited by sunrise99
Link to comment
Share on other sites

hi,

 

I have installed this app and all went fine , it logs in with the FB button but with Google it tells this :

 

Invalid parameter value for redirect_uri: Missing scheme: REDIRECT_URL

 

I have checked the url on Google and in my config.php and they both are the same.

 

What am i missing here?

 

Thanks in advance,

 

Rob

 

 

 

 

reason for edit: it´s friday and i can´t type

Edited by CrazyCarzCustoms
Link to comment
Share on other sites

You have a redirect url mismatch - similar to what sunrise has with his facebook app - double check your google app settings - if still no joy post your settings here and ill try to help.

 

Basic things to check for both is.

 

1 ) using www or without - for the apps http://www.somedomain.com is NOT THE SAME as http://somedomain.com

2) Likewise https://somedomain.com is not the same as http://somedomain.com basically if you have an SSL certificate then your customers when logging in will be using login.php WITH HTTPS . This means the redirect urls or website urls must also be with HTTPS.

 

My redirect URL( on my test site ) for google is http://ocraw.conzept.de/googleloader.php no https because i dont use SSL.

 

Jules

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...