Expand my Community achievements bar.

SOLVED

How to use Experience Fragment in externals sites

Avatar

Level 1

Hi Community,

 

I need to use experience fragments in external sites such as Facebook. If you can provide some tutorials, that would be helpful. As mentioned in some tutorials, "Experience Fragments HTML rendering output processor"  is not present in configMgr. Your response would be greatly appreciated. 

 

Thanks.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

1. Earlier after creating the experience fragments I just exposed those experience fragments as plain HTML from AEM.

Using the .plain. selector in the URL, you can access the plain HTML rendition as defined here -

DEBAL_DAS_0-1656496295962.png

Please refer this: https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/experience-fr...

 

2. Another application was making pull request to read the our experience fragments from AEM as html and get it displayed on their application. 

3. We made necessary change at dispatcher level to allow experience fragments for that external application.

4. While accessing experience fragments from AEM we had encountered CORS issue and then we allowed that external application domain to prevent CORS issue.

View solution in original post

7 Replies

Avatar

Level 1

Hi Arun,

 

I have created Facebook configuration like below and when I give connect I am getting "Sorry, something went wrong." error.

VenkateshKA1_1-1658135431757.png

When I give connect, I am getting below error.

VenkateshKA1_0-1658135339843.png

In Facebook developer's Page, I created consumer account and added Facebook Login. It is still in development mode. Please let me know if I missed anything in this process. Added below screenshot for reference

 

VenkateshKA1_2-1658135569605.png

VenkateshKA1_4-1658135898491.png

 

 

Avatar

Community Advisor

Hi,

Not sure what could be the issue, just one thing I noticed that you are trying using localhost and without https, this could be an issue but it is just a pure guess.



Arun Patidar

Avatar

Level 1

Hi Arun,

 

Thanks for the response. Is there anyway that we can test locally by using localhost. we have around 12 brands, do we need to create separate app for each brand.

Avatar

Correct answer by
Employee Advisor

1. Earlier after creating the experience fragments I just exposed those experience fragments as plain HTML from AEM.

Using the .plain. selector in the URL, you can access the plain HTML rendition as defined here -

DEBAL_DAS_0-1656496295962.png

Please refer this: https://experienceleague.adobe.com/docs/experience-manager-65/developing/extending-aem/experience-fr...

 

2. Another application was making pull request to read the our experience fragments from AEM as html and get it displayed on their application. 

3. We made necessary change at dispatcher level to allow experience fragments for that external application.

4. While accessing experience fragments from AEM we had encountered CORS issue and then we allowed that external application domain to prevent CORS issue.

Avatar

Level 1

Hello @DEBAL_DAS, how were you rendering the experience fragments? Were you using <iframe>? Is it necessary having the plain selector in the URL to access the HTML?