Diereemefrorm
New Member
I have been trying to attempt to use the facebook share function in my website but i cant seems to have the right result.Say:
i have a page called http://www.xxx.com/product.php?prod=lpd026n&cat=43and i am using facebook's share function to have visitors to share the page in the FB wall.i tried writing the link this way but i doesn't seems to be successful:
\[code\]href="http://www.facebook.com/share.php?u=www.xxx.com/proddetail.php?<?php print urlencode(@$_SERVER['QUERY_STRING']!=''?'?'.$_SERVER['QUERY_STRING']:'')?>"\[/code\]as the result the arguments in the URL came out to be in %26, %3D and etc..
Ie: xxx.com/proddetail.php?prod%3Dlpd026n%26cat%3D43as some of you may know that the data after '?' is dynamic and i am planing to use the code above in the frame of the page, so it will have different query passed to the share link in every new item.The end result that i want got to look like this: \[code\]http://www.facebook.com/sharer.php?u=http://www.xxx.com/proddetail.php?prod=lpd026n&cat=43\[/code\]Not \[code\]http://www.facebook.com/share.php?u=http://www.xxx.com/proddetail.php?prod%3Dlpd026n%26cat%3D43\[/code\]can anyone help me to solve this problem?
Thanks in advance!
Ps: if you are unclear, please ask me to further clarify.
i have a page called http://www.xxx.com/product.php?prod=lpd026n&cat=43and i am using facebook's share function to have visitors to share the page in the FB wall.i tried writing the link this way but i doesn't seems to be successful:
\[code\]href="http://www.facebook.com/share.php?u=www.xxx.com/proddetail.php?<?php print urlencode(@$_SERVER['QUERY_STRING']!=''?'?'.$_SERVER['QUERY_STRING']:'')?>"\[/code\]as the result the arguments in the URL came out to be in %26, %3D and etc..
Ie: xxx.com/proddetail.php?prod%3Dlpd026n%26cat%3D43as some of you may know that the data after '?' is dynamic and i am planing to use the code above in the frame of the page, so it will have different query passed to the share link in every new item.The end result that i want got to look like this: \[code\]http://www.facebook.com/sharer.php?u=http://www.xxx.com/proddetail.php?prod=lpd026n&cat=43\[/code\]Not \[code\]http://www.facebook.com/share.php?u=http://www.xxx.com/proddetail.php?prod%3Dlpd026n%26cat%3D43\[/code\]can anyone help me to solve this problem?
Thanks in advance!
Ps: if you are unclear, please ask me to further clarify.