Expand my Community achievements bar.

Facebook Login Integration in AEM

Avatar

Level 3

Hi,

I have come across an issue while integrating Facebook login with AEM. 

I took reference from below link

https://docs.adobe.com/docs/en/cq/5-6-1/administering/social_communities/social_connect.html

Although everything is working fine but on welcome page it is not displaying the logged in user name the way it is working for Geometrixx Outdoors website.

Instead it is displaiying the ID only.

Any suggestions who have already worked on this integration? :)

30 Replies

Avatar

Level 3

Jay Brown wrote...

JK Kendall wrote...

akshitaa82720401 wrote...

@JK 

One update on the issue :

Found that it is working as expected with Facebook API v2.3 and below. The issue exists for latest Facebook API v2.5.

Below are some of the findings:

  1. OAuth 2.0 implementation for facebook connect is done via provider api by Adobe
  2. “FacebookProviderImpl” class is responsible for fetching and storing Facebook User details into AEM. However, this implementation is not able to fetch first_name, last_name and various other details from Facebook profile due to API changes.
  3. Tested for Facebook API v2.0(working) and v2.5(not working)

-Akshita

 

Hi Akshita,

Your update is very much appreciated!  I'll see about putting a note on our doc page.

- JK

 

Hi there.  I am trying to look into fixing this; however, I have setup an AEM instance to test this, but I don't see the issue.

I registered with my FB account, and my full name appears in the masthead area of the geometrixx-outdoors site.  Also, if I dig into my profile, I see both my first and last name.

Can you describe the scenario to allow me to reproduce what you're seeing.

Thanks in advance.

-Jay

 

 

Hi Jay

Thanks for looking into this issue.

Have you created an app id in developers.facebook.com?

-Akshita

Avatar

Level 1

Hi, Akshita -- I did and also used the FB API tester to confirm that v2.0 through and including 2.5 return first_name and last_name (https://developers.facebook.com/tools/explorer).  As you can see, the basic information (first_name and last_name) work fine.

Please let me know what you can about your scenario.

Thanks and regards

-Jau

Avatar

Level 3

Jay Brown wrote...

Hi, Akshita -- I did and also used the FB API tester to confirm that v2.0 through and including 2.5 return first_name and last_name (https://developers.facebook.com/tools/explorer).  As you can see, the basic information (first_name and last_name) work fine.

Please let me know what you can about your scenario.

Thanks and regards

-Jau

 

Hi Jay,

In Graph API explorer, user details are coming for all versions. But I am not sure why the details are not getting stored in AEM.

Have you tried logging into Geometrix Outdoor site with your facebook configuration?

-Akshita

Avatar

Level 1

Hi Akshita, I sure did.  That was the first thing that I did.  Please provide any details you can as I'd like to help you solve your issue.

Thanks and regards

-Jay

Avatar

Level 3

Jay Brown wrote...

Hi Akshita, I sure did.  That was the first thing that I did.  Please provide any details you can as I'd like to help you solve your issue.

Thanks and regards

-Jay

 

 

Thanks Jay!!

But, When I am logging through Geometrixx it is displaying id only. Not sure why :(

I thought it is because of API version but for you it is working fine. 

Previously I have attached all the screenshot. Please check it once and let me know if I am doing it differently than yours.

-Akshita

Avatar

Community Advisor
Hi, Are you testing this in publish or author environment if author login will be done via admin credentials sometime can you test the same thing once in publish and check if it so same behaviour.

Avatar

Level 3

@korthivada

In publish instance also, it is showing the same behaviour.

Akshita

Avatar

Level 2

Hello,

Any solution to the problem?

 

I am also facing same issue with AEM6.1 and here is steps I have taken;

  1. Created new fb app id
  2. App I'd is approved with require permission that is public_profile
  3. Created new cloud service with new fb app id
  4. And tested, it works fine but public_profile attributes doesn't appear like family name,   Given name, email address etc. 
  5. The name node is available with name only
  6. Next test...
  7. Tried with geomatrixx provided cloud service and works fine and almost all public_profile attributes nodes with value is available
  8. Next test...
  9. Tried to add app id in geomatrixx cloud service and the result negative once again with none public_profile attributes available

Avatar

Level 9

Hi,

Akshita wrote :

 Found that it is working as expected with Facebook API v2.3 and below.

The issue exists for latest Facebook API v2.5.

Internally, we've been unable to reproduce the problem with Facebook API v2.5.

The current recommendation is to open a support ticket if you need v2.5.

- JK

Avatar

Level 9

UPDATE : upgrade to AEM 6.1 Communities FP4 to get support for Facebook API v2.5.

JK Kendall wrote...

Hi,

Akshita wrote :

 Found that it is working as expected with Facebook API v2.3 and below.

The issue exists for latest Facebook API v2.5.

Internally, we've been unable to reproduce the problem with Facebook API v2.5.

The current recommendation is to open a support ticket if you need v2.5.

- JK