ausgezeichnete Posted July 2, 2010 Share Posted July 2, 2010 Hello am using this code to share my content but the problem is in the looping value i can see the right value when i pass the mouse over the sharelink but when i click on it its links me to the first value of the "product_id" ex:it goes always to #1 http://localhost/mysite/coupons.php?...1§ion=22#1 the second problem that it doesnt show the thumbnail so plz any idea???????????????????????????? <?php do { ?> <a name="fb_share" type="button_count" share_url="http://localhost/mysite/coupons.php?product_section_id=<?php echo $_GET['product_section_id'];?>§ion=<?php echo $_GET['section'];?>#<?php echo $row_Recordset1['product_id']; ?>" href="http://www.facebook.com/sharer.php">Share</a> <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?> Link to comment https://forums.phpfreaks.com/topic/206513-facebook-share-link-dynamically-and-thumbnails/ Share on other sites More sharing options...
fred12ned Posted July 3, 2010 Share Posted July 3, 2010 Firstly, you might want to move "<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>" Out of the loop and put it in the <head> share_url="http://localhost/mysite/coupons.php?product_section_id=<?php echo $_GET['product_section_id'];?>§ion=<?php echo $_GET['section'];?>#<?php echo $row_Recordset1['product_id']; ?>" changing that to share_url="http://localhost/mysite/coupons.php?product_section_id=<?php echo $row_Recordset1['product_section_id'];?>§ion=<?php echo $row_Recordset1['section'];?>#<?php echo $row_Recordset1['product_id']; ?>" should fix it Link to comment https://forums.phpfreaks.com/topic/206513-facebook-share-link-dynamically-and-thumbnails/#findComment-1080634 Share on other sites More sharing options...
ausgezeichnete Posted July 3, 2010 Author Share Posted July 3, 2010 thanks fred 4 ur answer but what i noticed is that when i click on any one of the links and share it the value remains the same after that example:when i click on http://localhost/mysite/coupons.php?product_section_id=30§ion#408 it shares it without showing any thumbnail and when i click on the next value #410 its gives me also the same link example:when i click on http://localhost/mysite/coupons.php?product_section_id=30§ion<b>#408<b> although that i see the right link when the mouse is over the share link so any clue plz???????????????? Link to comment https://forums.phpfreaks.com/topic/206513-facebook-share-link-dynamically-and-thumbnails/#findComment-1080824 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.