Expand my Community achievements bar.

SOLVED

localhost link not valid for social sites sharing

Avatar

Level 5

I have created a component for sharing the page on social sites like facebook, twitter, linkedin and whatsapp. This work is done AEM as a Cloud Service. But there is a problem with localhost link. The sharing window opens up but it says "href is not valid". When I googled it, it says that localhost link doesn't work for sharing on social media. Is there any alternate solution for this by which I can test my component  locally whether it works fine or not?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

You can try testing using dispatcher and map localhost to some dummy domain e.g. 

https://dreamithost.com.au/how-to-change-localhost-file-on-mac 

 

If you want to test just to prove it is working then use your existing domain or pages, the reason is social media may not be able to connect to your local system to fetch and show content.



Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

You can try testing using dispatcher and map localhost to some dummy domain e.g. 

https://dreamithost.com.au/how-to-change-localhost-file-on-mac 

 

If you want to test just to prove it is working then use your existing domain or pages, the reason is social media may not be able to connect to your local system to fetch and show content.



Arun Patidar

Avatar

Level 2

You can use Nginx to generate public URL for your local host and test your component.

I did the same for HID testing.