Simple Facebook Connect Share Problem
-
Hello, I installed the Simple Facebook Connect and the Simple Twitter Connect.
Both plugins allow you to share your comments with facebook or twitter when you post a comment. With STC i have no issues doing this, however SFC shares the wrong post.
We have a list of post on the sidebar and according to the FAQ we probably wrote the code for it incorrectly.
Could someone take a look at the code for me and tell me if its missing something.
This is the code in the sidebar
<ul> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php $youtubevidid = get_post_meta($post->ID, 'youtubevidid', TRUE); ?> <li id="post-<?php the_ID(); ?>"> <span class="video-thumb"><a href="<?php the_permalink() ?>"><img src="https://i2.ytimg.com/vi/<?php echo $youtubevidid; ?>/default.jpg" alt="<?php the_title(); ?>" / ></a></span> <strong><a href="<?php the_permalink() ?>" rel="bookmark"><?php limit_title($post->post_title, 40); ?></a></strong><br /> <?php the_time('F jS, Y') ?> </li> <?php endwhile; else: ?> <li>No Recent Videos</li> <?php endif; ?> </ul>
This is the code in Functions.php
<?php function limit_title($title, $n){ if ( strlen ($title) > $n ) { echo substr(the_title($before = '', $after = '', FALSE), 0, $n) . '…'; } else { the_title(); } } ?>
Thanks in advance!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Simple Facebook Connect Share Problem’ is closed to new replies.