This is an old revision of the document!
The Social Connect Addon is meant primarily to allow your users to both register, and log in, using popular social websites such as Facebook and Google+. Currently only Facebook connect is implemented but we have plans to add more sites in future versions.
The secondary function is to add various integration options, such as showing a seller's Facebook profile pic on the seller's listings.
This addon currently allows users to click a link Login with Facebook. This will pop up a window that will let them log into their Facebook account, and "approve" your website's Facebook app to access minimal information. The user is then taken back to the site. Below are the different scenarios for what will happen:
When a new user is registered by using Login with Facebook, the following account fields are used.
<
These instructions will walk you through steps necessary to set your site up to start using Facebook Connect.
<
There are several addon tags that you can use in your design as explained below.
{addon author='geo_addons' addon='social_connect' tag='facebook_login_button'}
Use this tag to display the Login with Facebook button anywhere within your site. Note that we have a few suggestions on where you might want to place this tag in Template Suggestions.
Clicking will either log the user in (if FB account already linked to user's account), or will register a new user account using info from Facebook profile. <
Clicking will re-connect to the FB account. This can sometimes happen if it has been a while since the user has last authorized the account. As long as the user is already logged into Facebook, and has previously already allowed access to the site, to the user it will appear to re-load the current page with that button gone7). <
Clicking on the button will prompt the user to authorize the site to have access to the user's account info. Once they log in and authorize access, that pre-existing user's account will be "linked" to the Facebook account. <
{addon author='geo_addons' addon='social_connect' tag='facebook_session_profile_picture'}
If the user is currently logged in, and is linked to FB profile, this tag will display the user's Facebook profile picture.
{addon author='geo_addons' addon='social_connect' tag='facebook_listing_profile_picture'}
This is used on listing details page. If the seller's account is linked to FB, and that seller has checked to show his or her Facebook profile pic. This setting is found in my account information within my account, the setting named Show Facebook Profile Pic in Listings, as illustrated below:
This is our suggestion for changes to make to your templates, assuming you are using a design close to the default design.
In the file header.tpl, find this section:
<!-- START USER BAR --> <div id="user_bar"> Welcome, {module tag='display_username'} ( {if not $logged_in} {*Logged out code*} <a href="register.php">Register</a> | <a href="index.php?a=10">Login</a> {else} {*Logged in code*} <a href="index.php?a=4">My Account</a> | <a href="index.php?a=17">Logout</a> {/if} ) </div> <!-- END USER BAR -->
Replace that entire section, with the below modified version:
<!-- START USER BAR --> <div id="user_bar"> {addon author='geo_addons' addon='social_connect' tag='facebook_session_profile_picture' assign='fb_pic'} {if $fb_pic} <div style="float: left; border: 1px solid black; margin: 0px 8px 8px 5px; line-height: 0px;">{$fb_pic}</div> {/if} Welcome, {module tag='display_username'} ( {if not $logged_in} {*Logged out code*} <a href="register.php">Register</a> | <a href="index.php?a=10">Login</a> {else} {*Logged in code*} <a href="index.php?a=4">My Account</a> | <a href="index.php?a=17">Logout</a> {/if} ) {addon author='geo_addons' addon='social_connect' tag='facebook_login_button'} </div> <!-- END USER BAR -->
The above changes will make the Facebook profile pic display to the left of the normal "Welcome…" text, if the user is logged in with Facebook. If the user is not logged in with Facebook, it will show the appropriate Facebook button according to what is mentioned above in facebook_login_button.
Our main goal is to add more Social websites, to allow users to log in with Google+ and any others that clients might want.
We also plan to add deeper integration, for instance showing all your friends that use the website. If you have any suggestions of your own don't hesitate to let us know!