简体   繁体   中英

facebook share stopped working on my site! do i need to switch over to like or is a temporary issue with facebook?

This is the code that I have that was working.

<li><a target="_blank"  onclick="product_clicks('<?php echo $product['product_id']?>')" href="http://www.facebook.com/share.php?       u=<?php echo str_replace(array("/",":"),array("%2F","%3A"),base_url()."product/details/".$product['product_id']."/".@$affiliate_id)?>"><img src="<?PHP echo base_url(); ?>images/facebook_icon.png" alt="" /></a></li>

It looks like the code is generating two http:// for the url when I attempt to switch.

I wonder what changed?!

Any suggestions ideas?

Don't have solution, but maybe this will help a bit: I saw duplicate http (eg http://http%3A%2F%2Fwww ) when FB cannot resolve the link (eg site is down) or cannot access the page (eg page moved or removed) and tries to "fix it"

Example: http://www.facebook.com/sharer.php?u=http%3A%2F%2Fmyfakeserver%2Fno%2Fsuch%2Findex.php&t=This%20is%20not%20here

Did you try the link your code generates in browser, minimized to "u" parameter only (ie .../sharer.php?u=)?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM