Path

ez projects / facebook_connect / forum / general / feedback


Feedback

You need to be logged in to post messages in the forums. New users may register here.

John Moritz

Member since:
04 April 2008

Posts: 5

Friday 18 September 2009 11:58:04 am

Because Andre asked for feedback on the ezPublish developer forum, i write down some suggestions for the Facebook Connect extension. I know that some suggestions are still included on this extension. This is an overview like i do/plan it on my own site.

1. Include the Facebook Connect Button on Login and Registration Page. Every page a user can register and login needs this button.

2. You can show the Facebook Connect popup in different languages. For Example German language



<script src="http://static.ak.connect.facebook...0.4/FeatureLoader.js.php/de_DE" type="text/javascript"></script>



My consideration ist to get the [RegionalSetting] from the site.ini of the actual Siteaccess a user is in, and include the Locale Setting to the code above.
Sadly the language code of ezPublish and Facebook is not compatible. From now i dont know how to solve this on the easyiest way. Maybe thru a translation file, where for example ger-DE will be translated to de_DE.

3. If a user connects thru facebook_connect he should be redirected to a page where he can choose to login with an existing account or create a new eZuser.
If a fb.User creates a new eZuser, the existing Facebook data should be used as far as possible. It must be a fast solution. On my site i just have two form fields on fb_connect registration, for a username and the password. Password could also be created automaticly and after registration sended thru e-mail.

4. Is depending on 3.). Facebook gives you the ability to extend the Connection popup. On my site i need the birthday of every user. This data is not included on the standard facebook connect procedure. But you can extend this with FB.Connect.showPermissionDialog. Required data shoul be placed on a .ini file. So i build my permission dialog after requesting the ini file which data is needed. This gives me the chance to make the registration process as fast as possible.

more ideas are in my head, but i have to think about how to include all those things...
Up

John Moritz

Member since:
04 April 2008

Posts: 5

Friday 18 September 2009 1:16:53 pm

I saw in your readme file that you create a login button with:



<a href={"facebook/connect"|ezurl}>


 <img src="http://static.ak.fbcdn.net/images.../connect_light_medium_long.gif" alt="Connect"/>


 </a>



I use a shorter version for the same:



<fb:login-button onlogin='window.location={"facebook/connect"|ezurl};'></fb:login-button>


Up

André R

Member since:
20 August 2005

Posts: 171

Monday 21 September 2009 1:07:42 pm

1. Maybe, at least for ezwebin/ezflow designs.

2.Should probably use translation files for this.

3. Yes, I know. Need to create some sort of general way to handle this. I mentioned handlers, but could be higher level as well like ini settings.

4. Interesting, I need to test that out I think. (Actually, how do I test that out without having to A. create new facebook user or B. create new application to be able to get the approval/connect screen up the first time..)


And added your fbml variant of the login button in the doc.

--
ar

Up

John Moritz

Member since:
04 April 2008

Posts: 5

Wednesday 23 September 2009 10:13:07 am

-----
4. Interesting, I need to test that out I think. (Actually, how do I test that out without having to A. create new facebook user or B. create new application to be able to get the approval/connect screen up the first time..)
------


I hope i understand your question right:
So you have a Facebook User and a Facebook Connect testaplication, which are still connected together, and now you cant show the dialog again?
If you are logged in to facebook you have a button called "applications" on the lower left corner. On the popup choose "edit applications". Now your are on the "Application Settings" Site. On the right where it says "show: recently used", pick "Authorized".

Now your connected sites will be listed. Just delete the testapplication from there. Now you can restart the connection procedure. You can also edit the setting to delete confirmed permission. So the permission dialog appears again.
An alternate way to get the permission dialog is the following code:



<fb:prompt-permission perms="read_stream,publish_stream"> Grant permission for status updates </fb:prompt-permission>




I played around a little bit with the login button:



<fb:login-button autologoutlink="true" size="large" length="long" onlogin='FB.Connect.showPermissionDialog("read_stream", function(x){window.location="/facebook/connect";});'></fb:login-button>




This tiny code will first connect you to your site, then prompt the permission dialog with, for example, the read_stream permission, and after that redirect you to the /facebook/connect Module. If your are logged in with facebook, this button is not a login button anymore, but a logout button (autologoutlink="true").
I was choosing a big login button, facebook have different size for that. If you dont like the big one, just delete size="large" length="long".
On the evenening i will do some tests with the ini file, from where i want to get my required permissions, which should build my permission dialog.
Up

Felix Laate

Member since:
30 November 1999

Posts: 4

Monday 28 September 2009 9:41:44 am

Hi all,

for dinmat.no I needed something in between the hybrid and the fully integrated model. I needed to know which fb-user was in use, but didn't want to expose the users to the cumbersome registration.

So I made an operator which takes either $fb->get_loggedin_user() or an ID which is stored as an attribute in e.g. a comment object.

Simple, light and seamless integration.

Felix

Opportunity Manager ICT
Greater Stavanger
www.greaterstavanger.com

Up

Frederik Krautwald

Member since:
01 October 2010

Posts: 4

Monday 27 December 2010 9:50:21 pm

First, the readme document is flawed. Here are my corrections:

In 1. Usage section:

Original



2. To make FBML syntax workable add xmlns:fb="http://www.facebook.com/2008/fbml" in your <head> tag.




Change to



2. To make FBML syntax workable add xmlns:fb="http://www.facebook.com/2008/fbml" in your <html> tag. (E.g., <html xmlns:fb="http://www.facebook.com/2008/fbml">)




And in



3. Add the following line in the <body> tag.


  <script src="http://static.ak.connect.facebook..._lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>



shouldn't this be in between the <head> tag?




4. Create the login button with <fb:login-button></fb:login-button>



Where???




5. Add some Javascript:


 

<script type="text/javascript">


 {def $apikey = ezini('FacebookConnect', 'APIKey', 'content.ini')


      $templateBundleID = ezini('FacebookConnect', 'TemplateBundleID', 'content.ini')}


 FB.init("{$apikey}", "{'xd_receiver'|ezurl(no)}");


</script>



Where??? And isn't "TemplateBundleID" obsolete?




6. Set a rewrite rule for the static xd_receiver.html which should be placed in root



How does this rewrite rule look? Missing example for .htaccess

In the 2. Login section:



If there is a fbuid attribute stored in user class, user will be fetched by fbuid and logged in automatically.


Add FBUID attribute ID in content.ini.append



So, we should create a fbuid attribute in the user class? Of which type? Text line? And the identifier, should it be lowercase "fbuid" or uppercase?

Frederik Krautwald
Executive Creative Director

Up

Frederik Krautwald

Member since:
01 October 2010

Posts: 4

Wednesday 29 December 2010 2:46:37 am

In section 3 a javascript sample is provided that doesn't work as
FB.Facebook
is undefined; this example is then followed by a PHP4 example with no explaination, whatsoever, where to include the code or alike.

Obviously, the coders of this extension assume everyone else to mind read or be eZ Publish gurus. Sad as they mention in about the extension: "Contains a detailed integration guide and some examples how to use it."

Sorry, but this just isn't good enough.

Frederik Krautwald
Executive Creative Director

Up

Frederik Krautwald

Member since:
01 October 2010

Posts: 4

Wednesday 29 December 2010 2:52:41 am

And just one more thing; from the extension description: "User will be logged in automatically by login handler."

Where will user automatically be logged in? eZ Publish? Facebook?

Frederik Krautwald
Executive Creative Director

Up

You need to be logged in to post messages in the forums. New users may register here.