1
demian
Adding Facebook Like Button and comments to Publisher Module ?
  • 2011/4/28 18:34

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


Based on this topic
https://xoops.org/modules/newbb/viewto ... at&order=ASC&type=&mode=0

Ok so far far what i did was paste this code in my theme.html

<html xmlns="http://www.w3.org/1999/xhtml"  xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>"><div id="fb-root"></div> <scriptwindow.fbAsyncInit = function() { FB.init({appId'YOURID'statustruecookietruexfbmltrue}); }; (function() { var document.createElement('script'); e.type 'text/javascript'e.src document.location.protocol '//connect.facebook.net/en_US/all.js'e.async truedocument.getElementById('fb-root').appendChild(e); }()); </script>


** YOURID is my website fb id

then paste this code in publisher_item.html right before<div class="itemBody">for the fb like button
<br />
      <
iframe src="http://www.facebook.com/plugins/like.php?href=<{$xoops_url}>/modules/publisher/item.php?itemid=<{$item.itemid}>&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe>




and this code for comments in publisher_item.html right below <{$item.maintext}>

<div id="fb-root"></div>
<
script src="http://connect.facebook.net/en_US/all.js#appId=YOURID&xfbml=1"></script>
              <
fb:comments xid="publisher<{$item.itemid}>" url="<{$xoops_url}>/modules/publisher/item.php?itemid=<{$item.itemid}>" title="<{$item.title}>" numposts="10" width="640" publish_feed="true"></fb:comments>

** YOURID is website id


the status right now

1. Like Button - Working but the feed that appeared in my fb wall - the url of article is pointing to the right article but the title and description of the feed shows the title and description of my main page instead of the my publisher article title and desc

in the publisher article submission form i have make sure that i filled up the meta keywords and also the description..but still same problem...when i view source for my article ..my meta keywords and desc is displayed correctly

2. Comment Button - Working as expected - url, title, are correct

Help..what im doing wrong ? im using the latest publisher frm SVN


p/s: I hate fb but my sites users insist this function...lol


2
demian
Re: Adding Facebook Like Button and comments to Publisher Module ?
  • 2011/4/30 6:17

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29



Login

Who's Online

74 user(s) are online (46 user(s) are browsing Support Forums)


Members: 0


Guests: 74


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits