Table of Contents

Social Connect Addon (AKA Facebook Connect)

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.

<tip c w>Do not use or test this feature using the admin account or with any facebook account where the email on that account matches the email of the admin user in your Geo software</tip>

The secondary function is to add various integration options, such as showing a seller's Facebook profile pic on the seller's listings.

What It Does

This addon currently allows users to click a link Login with Facebook. This will direct them to a page 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:

Minimal User Registration

When a new user is registered by using Login with Facebook, the following account fields are used.

<

Addon Tags

There are several addon tags that you can use in your design as explained below.

facebook_login_button

{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. <

facebook_session_profile_picture

{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.

facebook_listing_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:

Template Suggestions

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.

Future Plans

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!

1)
requires Facebook profile to be verified, and is not very common. If user has username you can visit the profile page using http://www.facebook.com/facebookusername
2) , 3) , 4)
Note that a username can have spaces in it.
5)
The user must always use the "login with Facebook" button to log into an account originally created using the login with Facebook button.
6)
Technically the software could ask for permission to see more of the user's information, however the more things that are asked for, the less likely the user is to allow access. If it asked for all the user's information the user is more likely to just leave the site, so instead the software only asks for the minimal information.
7)
Although a lot more is going on than that, it happens so fast the user cannot tell