Topic-icon Sweepstakes Workflow with Facebook Auth Dialog Box?

Active Subscriptions:

None
I am planning to run a sweepstakes on facebook and I want to use JFBConnect's Tab functionality to run the platform.

To track entries, I was going to use a contact form extension. And to pick a winner, I was going to use a random number generator. Pretty simple and I think I have this part worked out, but what I would love to do is integrate a facebook authorization dialog that allows my application access to their email address, Likes, Interests, etc. This would provide me with valuable insight into who my facebook fans are, and it will also help manage entries into the sweepstakes and keep people from gaming the system to get additional entries.

I tried to do this using the "Login with Facebook" button, but JFB wants to create a user account in Joomla after authorization is approved, which adds another step to the entry process. It also looks odd, since the button says "Login with Facebook".

Is there another way to implement this functionality using JFBConnect? Thanks in advance for any advice!
The topic has been locked.
Support Specialist
14 years 5 months ago #17265 by alzander
Ryan,
I'm pretty sure I understand what you're looking for, and will try to give the best suggestions I can. If I'm off in what I'm saying, just reign me in, and let me know how you'd like to do things differently.

1) You can use the "Facebook User Only" User Creation setting of JFBConnect so that when a user clicks the Login button it silently creates them an account in Joomla. I know you may not want an account, but that's the best suggestion for now to not even let them know they created one. There are ways to have them approve your FB application and then get their email address without creating an account, but that's not how JFBConnect is structured at all. Our code always expects that if there's a user you want to get info on, that they have a Joomla account as well.
2) Once the account is created in Joomla, you'll have easy access to their email address (it will be in the User Manager) and many contact forms can auto-populate that field, or link it to the user behind the scenes.. another reason having a Joomla account for the user is good :)
3) You can have JFBConnect skip user activation, while leaving it enabled for the rest of the site. Generally a good idea since Facebook has already verified the user's email address.
4)You can create your own Login With Facebook button image or text.. "Register for the Sweepstakes Now!" can easily be used. You can simply change the text of the blue-button in the language file.. or you can go hog-wild and use your own image or something craftier. Directions for creating your own Login button can be found on the following page. See the 2nd question:
www.sourcecoast.com/jfbconnect/docs/common-support-questions

Hopefully, some of that gives you some new ideas on what you can do. Of course, feel free to come back with other questions or ideas, and we'll gladly help how we can!

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Thanks for the help and the ideas! I'm trying to use the facebook log in button now, but I'm getting some redirect loops that end up breaking the site. After the redirect loop starts, I can't access any page on the domain until I clear my browser cookies.

After the redirect times out, I get the following URL's in the address bar:
domain.com/includes/js/joomla.javascript.js
domain.com/component/com_jfbconnect/return,L3N3ZWVwc3Rha2VzL3N3ZWVwc3Rha2VzLWVudHJ5LWZvcm0=/task,loginFacebookUser/

Any ideas on what might be causing this? Other major components include K2, SH404SEF and RocketTheme's Gantry Framework. I'm running Joomla 1.7.3 on PHP 5.3.5.

Note: If it helps, I can PM log in credentials and the URL where the redirect loops occur. :)
The topic has been locked.
Support Specialist
14 years 5 months ago #17356 by alzander
Within sh404SEF, in the configuration->By Component area, set JFBConnect to "Skip". That will prevent sh404 from modifying our URLs, which can cause issues when communicating with Facebook.

Hopefully, that will fix you up, but if not, let us know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
Unfortunately no, it did not fix it. :(

I am also testing the JFBC Log In module. The log in and user creation process seems to work ok, but the log out process redirects me to the following URL, which is a 404...
domain.com/plugins/content/mavikthumbnails/style.php?base=http://www.ridepros.com/
The topic has been locked.
Active Subscriptions:

None
And sometimes when I click the Logout button on the "K2 User" module, the page refreshes, the user is not logged out and I get a system notification that says "Automatically logging you in with your Facebook credentials".
The topic has been locked.
Support Specialist
14 years 5 months ago #17365 by alzander
Can you post (or private message) the URL of the site this is happening on so we can see what's loading on the front end? Sounds like some sort of conflict, but tough to diagnose without all of the pieces.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
PM sent, thanks!
The topic has been locked.
Support Specialist
14 years 5 months ago #17367 by alzander
Thanks for the PM. The problem is that you have another extension including the Facebook Javascript library, and initializing it improperly for Facebook Connect functionality. I'm not sure what the other extension is, but if you open the HTML on your page and search for "all.js", you'll see it's in there twice. The first is the other extension. The 2nd is JFBConnect.

You need to remove that call from the other extension or else unknown results will happen page to page depending on which extension gets the Facebook library loaded first.

Hope that helps get you started,
Alex
The topic has been locked.
Active Subscriptions:

None
Its funny you mention that, I actually noticed that this morning. I was able to fix it, turns out SH404SEF now has a plugin that is automatically enabled upon install and it injects the facebook JS code site wide.

However, the redirect loop and log out issues are still present on my site. :(
The topic has been locked.