andes1 Posted May 26, 2011 Share Posted May 26, 2011 (edited) Hello long time....some people are getting troubles loggin off from the store. First remember this: logoff.php - first change yourdomain.com to your websites domain. Make sure you have the '.' before it. FIND: $cart->reset(); ADD AFTER: //Facebook Connect include 'includes/classes/facebook.php'; include_once "fbconnect.php"; setcookie('fbs_'.$facebook->getAppId(), '', time()-100, '/', '.yourdomain.com'); Second if the customer wants to logoff completely, he has to do it, from FB and from your store. find the first </table></td> add before that <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_MAIN; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_FB; ?></td> <?php //FACEBOOK LOGOFF LITERATURE AND BUTTON ?> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><a target="_blank" href="http://m.facebook.com/logout.php" onclick="FB.Connect.logout(function() { reload(); }); return false;" ><img id="fb_logout_image" src="http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_small.gif" alt="Connect"/></a> </td> </tr> EASY! Edited May 26, 2011 by andes1 Quote Link to comment Share on other sites More sharing options...
Denz Posted June 20, 2011 Share Posted June 20, 2011 I only find with IE8 I have to refresh the login page to show FB login correctly as it will only show "Login with Facebook" with no link or image - could need some help on this please! I have this problem too.... does anyone have an answer to it??? Quote Link to comment Share on other sites More sharing options...
TJL Posted June 22, 2011 Share Posted June 22, 2011 I have this problem too.... does anyone have an answer to it??? This worked for me.... Just add these two xmlns attributes to your page’s main html tag: xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/" After adding this attribute to the HTML tag your, html tag – fully completed should look like this: <html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/"> I hope this helps. Quote Link to comment Share on other sites More sharing options...
Peper Posted June 24, 2011 Share Posted June 24, 2011 This worked for me.... Just add these two xmlns attributes to your page’s main html tag: xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/"'>http://opengraphprotocol.org/schema/" After adding this attribute to the HTML tag your, html tag – fully completed should look like this: <html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/"'>http://opengraphprotocol.org/schema/"> I hope this helps. More specific! It just prints out xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/"'>http://opengraphprotocol.org/schema/" So I added <html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/ "> to the header content of the login.php page Seems to work fine now Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
cfemoca Posted July 11, 2011 Share Posted July 11, 2011 i've just installed facebook connect on my local testing site and got an Javascript error. I went through the code and found that FB.init({appId: '<?=$fbconfig['appid' ]?>', status: true, cookie: true, xfbml: true}); if I change <?=$fbconfig['appid' ]?> from above code to <?php $fbconfig['appid' ]?> the javascript error would disappear but facebook login is still not working for me. Please help. Quote Link to comment Share on other sites More sharing options...
cfemoca Posted July 12, 2011 Share Posted July 12, 2011 I tried this contribution on a clean install of Osc 2.2rc2a and have trouble getting it to work. The login.php and create_account.php refreshes itself and never actually got logged in or do anything. This happens when I'm logged in to my facebook account and when I logged out the page would stop refreshing itself. I am currently running this on my local machine, and in logoff.php I have changed the domain name to ".localhost" like below setcookie('fbs_'.$facebook->getAppId(), '', time()-100, '/', '.localhost'); I see other people have mentioned the same problem, has anyone actually got this sorted? I've spend 2 days working at it and still can't find any fix. Any help would be appreciated. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
Denz Posted July 29, 2011 Share Posted July 29, 2011 Hi Guys, I sorta have this working but not without it's issues. Not sure if it is browser version, firefox, or conflict with PWA or what, but.... I also have the create_account.php refreshing itself and never actually got logged in or do anything - keeps saying password has to be 6 characters! Even when you make sure it is, it just comes back to that! Frustrating. And when I have the facebook connect active it gives the same error for a simple create account! If I remove FB Connect, everything works fine. BUT - for me, I have managed to make a facebook account (before I started getting this error) and it keeps working sweet for me. This error seems to have come about in the last month! Can anyone help? I would love to get this going as I think lots of people like to log in this way now. Thanks Quote Link to comment Share on other sites More sharing options...
Guest Posted July 30, 2011 Share Posted July 30, 2011 Hey Everyone! I don't have these codes in my files:: <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> <tr> <td class="smallText"><br><?php echo sprintf(TEXT_ORIGIN_LOGIN, tep_href_link(FILENAME_LOGIN, tep_get_all_get_params(), 'SSL')); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> I'm going to try adding the code that I'm supposed to add before/after anyway, just to see what happens. Looking forward to an answer! :) Thanks! Quote Link to comment Share on other sites More sharing options...
Guest Posted July 31, 2011 Share Posted July 31, 2011 Well, that didn't work :P Help :] Quote Link to comment Share on other sites More sharing options...
aarthiraj Posted August 2, 2011 Share Posted August 2, 2011 HI, I FB login button requests for permision everytime the buton is clicked. How do i make it to request permision only when the user clicks the FB login buton for the first time and from then onwards, it should log them in straight away. Thanks Aarthi Quote Link to comment Share on other sites More sharing options...
logo Posted August 20, 2011 Share Posted August 20, 2011 Hello. My site uses STS... I have installed the addon , but when I log in through facebook the site login button does not change to logout. Meaning the customer_id session was not registered. Does anyone knows if for the STS users some additional changes should be made ? Thanks Quote Link to comment Share on other sites More sharing options...
AnindaSingh Posted September 6, 2011 Share Posted September 6, 2011 Hi, has anyone implemented this with v2.3? I am unable to do the same and i am a greenhorn at php. if anyone has implemented the module, could you please share the updated files? thanks a lot for the help Quote Link to comment Share on other sites More sharing options...
DareeoHUN Posted October 8, 2011 Share Posted October 8, 2011 Hello I have a problem with character encoding. I want to use FB connect here in Hungary, but if I connect, the neme has encoding problems. Example: My name is Dárió, but after FB connect it's showing DĂĄriĂł. Hungarian special characters is in utf8. What I need to do to get a correct values (or show it correct) from facebook? Sorry for my bad english- Thank you Quote Link to comment Share on other sites More sharing options...
paddybl Posted October 12, 2011 Share Posted October 12, 2011 a solution for logout problem: in create_account.php find <tr> <td> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '<?=$fbconfig['appid' ]?>', status: true, cookie: true, xfbml: true}); /* All the events registered */ FB.Event.subscribe('auth.login', function(response) { // do something with response login(); }); FB.Event.subscribe('auth.logout', function(response) { // do something with response logout(); }); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); function login(){ document.location.href = "create_account.php"; } function logout(){ document.location.href = "logoff.php"; } </script> <?php if($fbme){ }else{?> <p> <fb:login-button autologoutlink="true" perms="email,offline_access,user_birthday,user_location,user_work_history,user_religion_politics,user_relationships">Connect with Facebook</fb:login-button> </p> <?php }?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> replace with <tr> <td> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '<?php echo $fbconfig['appid' ];?>', status: true, cookie: true, xfbml: true}); /* All the events registered */ FB.Event.subscribe('auth.login', function(response) { // do something with response login(); }); FB.Event.subscribe('auth.logout', function(response) { // do something with response logout(); }); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); function login(){ document.location.href = "create_account.php"; } function logout(){ document.location.href = "logoff.php"; } </script> <?php if($fbme){?> <div align="right"> <a href="#" onclick="FB.logout(function() {window.location = 'Login.php'; }); return false;" class="main" ><img id="fb_logout_image" src="http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_small.gif" alt="Connect"/> Use another Facebook account?</a></div> <?php }else{?> <p> <fb:login-button autologoutlink="true" perms="email,offline_access,user_birthday,user_location,user_work_history,user_religion_politics,user_relationships">Connection</fb:login-button> </p> <?php }?> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> in logoff.php add this code somewhere in the <body> <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '<?php echo $fbconfig['appid' ];?>', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.type = 'text/javascript'; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> <div align="right"> <a href="#" onclick="FB.logout(function() {window.location = 'index.php'; }); return false;" class="main" ><img id="fb_logout_image" src="http://static.ak.fbcdn.net/images/fbconnect/logout-buttons/logout_small.gif" alt="Connect"/> Don't forget to disconnect from Facebook!</a></div> Quote Link to comment Share on other sites More sharing options...
cristiwww Posted October 29, 2011 Share Posted October 29, 2011 Hello, I need help for two problems. 1. How can I setup fb connect to display the correct birthdate in create_account.php? My store is setup to show/input the birthdate in dd/mm/yyyy format but when try to create a new account via facebook connect the birthdate is autocompleted like mm/dd/yyyy. 2. Does anyoane succeded to put the facebook login button in loginbox.php column? It doesn't look great to have fb login only in login.php and create_account.php and not in column left, if you use loginbox.php, of course. Thank you in advance, Cristi Quote Link to comment Share on other sites More sharing options...
Gonzola Posted November 1, 2011 Share Posted November 1, 2011 It it possible to ad more then one shop to the facebook account to recieve the API key, I tried today and it seems only possible with one shop for one account If you have 5 shops you need to register 5 FB accounts, really stupid Quote Link to comment Share on other sites More sharing options...
tkeats Posted November 26, 2011 Share Posted November 26, 2011 (B) FIND: <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> These lines dont exist in oscommerce 2.3.1 version of login.php ?? There are major changes I think, that require a reword of the files. Quote A signature is something that reflects its user. - The dictionary The question is not, 'to code, or not to code' the question is, 'if we do not code, are we really alive?' -- anonymous Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2011 Share Posted December 15, 2011 So will this work on OS 2.31? I'm supprise that OScommerce has not incorporated this into there OS Ari Quote Link to comment Share on other sites More sharing options...
OSC-Sevilla Posted December 16, 2011 Share Posted December 16, 2011 Install as per the instructions, couple of simple mods to show ok in 2.3.1 - Issue: Clicking on the fb button in login.php does nothing. - anyone got this working for 2.3.1? Quote Link to comment Share on other sites More sharing options...
ksatishkumar_in Posted December 17, 2011 Share Posted December 17, 2011 Yes, i have the same issue. Installed as per instructions. when i click fb button nothing happens. Quote Link to comment Share on other sites More sharing options...
Marcel1234 Posted December 19, 2011 Share Posted December 19, 2011 I have also the problem when i click facebook button, nothing happens. Quote Link to comment Share on other sites More sharing options...
addeaz Posted December 20, 2011 Share Posted December 20, 2011 Hi, I got the version 2.2 RC2. Facebook Connect have been working for me for a long period of time. For a week ago it stoped working, withour changing the code. Did anyone else experience this? This happens; When I haven't logged into Facebook, nothing happens when I click the buttom. When I am logged into Facebook, I am comming to the logout.php page when I click the login buttom :( Anyone have a clue what's wrong? Cheers Andreas Quote Link to comment Share on other sites More sharing options...
addeaz Posted December 21, 2011 Share Posted December 21, 2011 Hi again Facebook has recently updated its API and make it compulsory for Facebook Connect applications to use the latest OAuth 2.0. The announcement was made last Tuesday, 13th December 2011 in the official. It is after that date this integration doesnt work. Some older keys were not configured to support OAuth2.0 upgrades, so I resetted tha Facebook app to have a new 15 character key (the new standard) I also changed this in the database. Since the api key and app ID now is the same, maybe there must be some more changes than just update them in the fbconnect.php file? Does anyone get connect to work with OSCommerce 2.2 RC2? //Andreas Quote Link to comment Share on other sites More sharing options...
addeaz Posted December 21, 2011 Share Posted December 21, 2011 (edited) Here is some info of the changes, I did not fix it myself yet, anyone else get it?:) http://developers.fa.../blog/post/614/ https://developers.f.../blog/post/525/ Btw. Now when I did a resetting, nothing happens when I click the fb.button. The same problem for me now with 2.2 RC2 as you before with OScommerce version 2.3.1 Edited December 21, 2011 by addeaz Quote Link to comment Share on other sites More sharing options...
juanmasi1 Posted December 22, 2011 Share Posted December 22, 2011 Here is some info of the changes, I did not fix it myself yet, anyone else get it? http://developers.fa.../blog/post/614/ https://developers.f.../blog/post/525/ Btw. Now when I did a resetting, nothing happens when I click the fb.button. The same problem for me now with 2.2 RC2 as you before with OScommerce version 2.3.1 hi andreas, this contribution would be made obsolete by changes in facebook for those who use oscommerce ... should wait for a correction so that we can reuse. I do not know much about php, maybe you can find some other contribution to work in joomla, or any other and adapt to our needs in oscommerce, any news or if someone could make corrections post to the forum, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.