1
fdeconiac
Need page url to use facebook plugin : how to do?
  • 2010/8/4 10:34

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Hello xoopsers,

I would like to incorporate facebook below my articles and photos in a block.

facebook gives the code, but i need the url of each page to use it.

Do you know how i can integrate it on my code?

On french xoops support, Muss adviced me to use the tag
<{$xoops_requesturl}>
but it doesn't work. I also use with and without < >


Facebook code :
<iframe src="http://www.facebook.com/plugins/like.php?href=%7B%24xoops_requesturl%7D&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true">iframe>


Does someone already use facebook like plugins on his website?

Thanks for your help,

Francois

2
ghia
Re: Need page url to use facebook plugin : how to do?
  • 2010/8/4 11:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


It should be xoops_requesturi

3
fdeconiac
Re: Need page url to use facebook plugin : how to do?
  • 2010/8/4 12:22

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Thanks Ghia,

Just tried with

<iframe src="http://www.facebook.com/plugins/like.php?href=$xoops_requesturi+&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&height=80"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true">iframe>


<iframe src="http://www.facebook.com/plugins/like.php?href=xoops_requesturi+&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&height=80"
scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true">iframe>


Still not working ;)

Maybe i'm missing something else in the url? I do not have knowledge in php ($, <>, ? ...)

Any idea ?

4
ghia
Re: Need page url to use facebook plugin : how to do?
  • 2010/8/4 12:42

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


You must use it as Smarty tag:
<{$xoops_requesturi}>
You are trying to insert this in a theme or template file, right?
Use like:
<iframe src="http://www.facebook.com/plugins/like.php?href=<{$xoops_requesturi}>&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true">iframe>
Not sure if this is the correct FaceBook code required.

5
fdeconiac
Re: Need page url to use facebook plugin : how to do?
  • 2010/8/4 13:47

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Hi Ghia,

Im trying to insert it in a block (not in the theme or template)...

Because i would like to insert it only for some module (news, extgallery,...)

Your code doesn't seems to work :( but il'm sure it should be something like that!

Tks a lot


6
ghia
Re: Need page url to use facebook plugin : how to do?
  • 2010/8/4 15:36

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Try a php block
echo '], ENT_QUOTES).'&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true">';

7
fdeconiac
Re: Need page url to use facebook plugin : how to do?
  • 2010/8/4 16:21

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


Thanks Ghia,

Can i use it in a block?

Or should i insert it in the theme?

8
fdeconiac
Re: Need page url to use facebook plugin : how to do?
  • 2010/8/29 17:21

  • fdeconiac

  • Quite a regular

  • Posts: 278

  • Since: 2008/11/29


For xoppser interested, i found an alternative to the iframe code, using xfbml :

First, add facebook SDK javascript allowing to use fbml on your site :
More infos here : Javascript SDK Facebook
<div id="fb-root">div> <script>   window.fbAsyncInit = function() {     FB.init({appId'[b]your app id[/b]'statustruecookietrue,              xfbmltrue});   };   (function() {     var document.createElement('script'); e.async true;     e.src document.location.protocol +       '//connect.facebook.net/[b]en_US[/b]/all.js';     document.getElementById('fb-root').appendChild(e);   }()); script>


- If you want to change like by j'aime, modify "en_US" by "fr_FR"
- You also have to complete the code with the id of a facebook application or page (change "your app id")
Next you can insert fbml :
<fb:like>fb:like>


Hope it will be usefull

Regards

9
spyblaster91
Re: Need page url to use facebook plugin : how to do?

can someone tell me where to put the sdk codes?

10
ghia
Re: Need page url to use facebook plugin : how to do?
  • 2010/9/1 6:24

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


I assume you have to replace 'your app id'.
Check the link to the Facebook site above for more details.

Login

Who's Online

157 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 157


more...

Donat-O-Meter

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

Latest GitHub Commits