Jump to content

Facebook Share link Dynamically and Thumbnails


ausgezeichnete

Recommended Posts

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&section=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'];?>&section=<?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
Share on other sites

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'];?>&section=<?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'];?>&section=<?php echo $row_Recordset1['section'];?>#<?php echo $row_Recordset1['product_id']; ?>"

 

should fix it

 

Link to comment
Share on other sites

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&section#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&section<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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.