How to add a FB like box in html block

How to add a FB like box in html block

by Victor Santos -
Number of replies: 3

Hi,

I want to insert this fb likebox in a html block

the code I have is something similar to this:

<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2FFacebookDevelopers&amp;width&amp;height=290&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=false&amp;show_border=true&amp;appId=536634966455285" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:290px;" allowTransparency="true"></iframe>


But when I try i get this result:

Forbidden

You don't have permission to access /online/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Any ideas?

Thank you.

I even tried to replace iframe with object and I'm able to save the block, but it's totally blank.


Average of ratings: -
In reply to Victor Santos

Re: How to add a FB like box in html block

by Usman Asar -
Picture of Plugin developers Picture of Testers
Victor,

are you using Moodle on HTTPS?

There can be 2 possibilities of adding Facebook Social Tools.

Using iframe and using HTML 5

in using HTML5, you'll have 2 pieces of code (one to be inserted in <body> tag Administration > Appearance > Additional HTML. other where FB like box is to be loaded). it will be on form of <div> tag.

<div class="fb-like" data-href="https://www.facebook.com/myfbpage" data-width="240" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

Let me know if  you still cant.
In reply to Usman Asar

Re: How to add a FB like box in html block

by Victor Santos -

Hello Usman,

I used your HTML advice and it's working very well.

Thank you.

In reply to Victor Santos

Re: How to add a FB like box in html block

by Usman Asar -
Picture of Plugin developers Picture of Testers

Good to know its working for you Victor, after your last reply confirming its working for you I looked up on my post and thought, "What a bad way to tell someone how to do things", I could have made it even easier but may be I was occupied with some other thing that is why wrote in sort of confusing manner - Apologies if you have had difficulty getting my idea across.


Then I looked at your original code you pasted as even <iframe> should have worked, now I am getting idea of your code not working, and that  was because of "AppID", you must have registered Facebook like box as Application under developer's account, to use Facebook Applications, you have to have SSL activated on your domain, else Facebook Applications (Games, Applications etc that you developed) will not work.