Link to home
Start Free TrialLog in
Avatar of badwolfff
badwolfffFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Facebook share stripping my Joomla share link code

I am trying to share a link on facebook from my joomla site but facebook is stripping a part of my link.

The link I'd like to add is:
http://www.absolutproject.com/zuenelli/plugins/content/sige/plugin_sige/facebook.php?img=http%3A%2F%2Fwww.absolutproject.com%2Fzuenelli%2Fimages%2Fgalleries%2Fcamere_moderne%2FJESSE_HomeStyle_Pagina_38_Immagine_0001.jpg&name=JESSE_HomeStyle_Pagina_38_Immagine_0001

My syntax for adding this link is:
http://www.facebook.com/sharer.php?u=http://www.absolutproject.com/zuenelli/plugins/content/sige/plugin_sige/facebook.php?img=http%3A%2F%2Fwww.absolutproject.com%2Fzuenelli%2Fimages%2Fgalleries%2Fcamere_moderne%2FJESSE_HomeStyle_Pagina_38_Immagine_0001.jpg&name=JESSE_HomeStyle_Pagina_38_Immagine_0001

However after this link gets added on Facebook when I click on it I reach the following page:
http://www.absolutproject.com/zuenelli/plugins/content/sige/plugin_sige/facebook.php?img=http%3A%2F%2Fwww.absolutproject.com%2Fzuenelli%2Fimages%2Fgalleries%2Fcamere_moderne%2FJESSE_HomeStyle_Pagina_38_Immagine_0001.jpg

As you can clearly see the last part of the code is being stripped:
&name=JESSE_HomeStyle_Pagina_38_Immagine_0001

Why is this happening? When I am inside facebook and I try to share the link from within facebook, the whole link can be added without being stripped.

I am attaching my facebook.php file which genereates this page, should it be necessary.

What am I doing wrong and how can I fix this problem?

Thanks in advance.
facebook.php
Avatar of SamMacPC
SamMacPC

You should be using a URL shortner anyway, as those URLs are too long and complex to bookmark and share and will break. That is why it's cutting the link off.

Go to bit.ly and see whether you can get a URL shortening button integrated. Sharethis.com may also have similar options.

--Sam
Avatar of badwolfff

ASKER

Hi SamMacPC,

thanks so much for the idea. However there is snag in this. My links are generated on the fly and I can't go to bit.ly each time to generate a shorlink for each of them.
Is there a way I could generate the bit.ly link on the fly too?

thanks again
Hi SamMacPC
Do you know how the bit.ly api works?
Could I integrate it into my php code to generate links on the fly?
thanks again
ASKER CERTIFIED SOLUTION
Avatar of badwolfff
badwolfff
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial