Facebook Sign up and JSF - facebook

In my netbeans 7.2 . I am using JSF Primefaces 3.5 and i am trying to add the facebook sign up in the application but i got an error saying that "The entity name must be immediately follow the '&' in the entity reference"
<iframe src="https://www.facebook.com/plugins/registration?
client_id=113869198637480&
redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fecho%2F&
fields=name,birthday,gender,location,email"
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="100%"
height="330">
</iframe>
I just followed how facebook did .. please help ... thanks ... Beginner here ...

For the record, you can't use & directly in xhtml, you need html entites like &.

Related

"The parameter href is required" error using Facebook Page Plugin

A user reported that the Page Plugin widget throws an error for him: "the parameter href is required".
So I dug a little deeper, and found that if I put the demo code (which can be found on https://developers.facebook.com/docs/plugins/page-plugin/) in a codepen, it throws the same error, as you can see here: .
HTML:
<iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Ffacebook&tabs=timeline&width=340&height=500&small_header=true&adapt_container_width=true&hide_cover=false&show_facepile=true&appId" width="340" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
Here's the pen: https://codepen.io/binoculars88/pen/gOaYGBX .
On the docs page it does work, but that might be because of a different type of integration.
It is working properly on my end, so I find it very hard to debug. The user isn't using an ad blocker. Any tips?

How to switch off autoplay when displaying facebook wall (includes videos) on web-page

I am using the drupal module https://drupal.org/project/facebook_wall to pull a facebook wall onto my website. The wall contains facebook videos, and all of these start, so autoplay must be set to on by default.
Is there a way to pull the wall with autoplay switched off?
The module requests the facebook page using curl and the graph api:
$api_url = 'https://graph.facebook.com/' . FB_PAGE_NAME . '/posts?access_token=' . FB_ACCESS_TOKEN . '&limit=10'
Changing the url to this one doesn't change anything:
$api_url = 'https://graph.facebook.com/' . FB_PAGE_NAME . '/posts?access_token=' . FB_ACCESS_TOKEN . '&limit=10&autoplay=off'
The url of one of the videos is constructed like this:
<iframe scrolling="no" width="400" height="250" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxxx_n.mp4?oh=yyy&oe=zzz&__gda__=aaa" frameborder="0"></iframe>
In the original version of the question, I had entered here the "embed" line that is displayed on the finished page. I then realized that it must have been embedded through the iframe tag, which is what the module pulls from facebook.
I changed the iframe tag to:
<iframe scrolling="no" width="400" height="250" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxxx_n.mp4?autoplay=false&oh=yyy&oe=zzz&__gda__=aaa" frameborder="0"></iframe>
The good news is: the video doesn't start.
The bad news is: instead of the video, the following error message is displayed:
An error occurred while processing your request.
Reference #50.bcb754b8.1377899267.aa42993
Any idea what to possibly do to switch the player off?
You need to pass the argument
<embed width="100%" height="100%" name="plugin" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxx_n.mp4?oh=yyy&oe=zzz&__gda__=aaa" type="video/mp4">
to
<embed width="100%" height="100%" name="plugin" src="https://fbcdn-video-a.akamaihd.net/hvideo-ak-ash3/v/xxxx_n.mp4?oh=yyy&oe=zzz&__gda__=aaa" type="video/mp4" autoplay="false">
to do this, I think maybe you can try the following code
$api_url = 'https://graph.facebook.com/' . FB_PAGE_NAME . '/posts?access_token=' . FB_ACCESS_TOKEN . '&autoplay=false';
Let me know if that way works.

Facebook registration plugin is not displaying fields

I have the following facebook registration plugin that lets user register through their FB account. Following is theiFrame that does this job.
<iframe src="https://www.facebook.com/plugins/registration.php?
client_id=239703062769103&
redirect_uri=http://www.booze-log.com/kruskirety/profileThis.php
fields=name,birthday,gender,location,email"
scrolling="auto"
frameborder="no"
style="border:none"
allowTransparency="true"
width="100%"
height="330">
</iframe>
When this displays, only the name field of the user is visible and the rest-birthday, gender, location, email are not visible. I tried setting the fields to JSON type as well but the problem still persists.
Here is the screenshot of what the problem looks like
Help would be appreciated.
So I have found the answer. It was a minor missing of &-ampersand, after profileThis.php in redirect_uri that was causing this issue. A silly mistake costs both time and effort I reckon.

Facebook comments are duplicated on every page

I am trying to integrate facebook comments into my website (I tried to do it several months ago but there didn't seem much support about and I couldn't fathom it). The comments are showing and I managed to get the comment to show on my facebook wall under the individual post/item they were meant for but unfortunately it is posting the same comment under every post. You can see the box working here: http://www.roomfor5.co.uk/item/6726
The website is php based and the code I am using is: " title="" url="" width="600" publish="true" >
I have also used this code without success: " width="600" publish="true" >
I know it's something to do with the xid attribute but I am stumped as to why it is duplicating:(
Hi when looking at the view source of your page I see this:
<fb:comments
xid="http://www.roomfor5.co.uk-<?=str_replace('/','-',$_SERVER['REQUEST_URI']);?>"
num_posts="2"
width="600"
publish="true" >
</fb:comments>
So the fb:comments tag is not getting rendered out fully.
Also on the rendered page, it says you haven't specified the url. while there is a malformed xid= attribute, you really should have a url= attribute. See https://developers.facebook.com/docs/reference/plugins/comments/
Warning: this comments plugin is operating in
compatibility mode, but has no posts yet.
Consider specifying an explicit 'href' as
suggested in the comments plugin documentation
to take advantage of all plugin features.
EDIT:
For http://www.roomfor5.co.uk/item/6726, you have
<div
class="fb-comments"
data-href="http://www.roomfor5.co.uk"
data-num-posts="5"
data-width="600">
</div>
The data-href attribute should be http://www.roomfor5.co.uk/item/6726 not http://www.roomfor5.co.uk
If you click 'View source' you'll see the rendered HTML:
<fb:comments xid="http://www.roomfor5.co.uk-<?=str_replace('/','-',$_SERVER['REQUEST_URI']);?>" num_posts="2" width="600" publish="true" >
It looks like you're trying to specify a unique xid for the page but the server-side script is behaving like plain text.

GWT history iframe

I am using GWT and need history and using:
<iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
But can I change __gwt_historyFrame to any other name AAAAA? Is it possible like below:
<iframe src="javascript:''" id="AAAAA" style="width:0;height:0;border:0"></iframe>
Here is some good documentation on the GWT History: http://developerlife.com/tutorials/?p=232
and Google's documentation on the host page: http://www.gwtapps.com/doc/html/com.google.gwt.doc.DeveloperGuide.Fundamentals.HostPage.html
Giving the following code example:
<!-- Include a history iframe to enable full GWT history support -->
<!-- (the id must be exactly as shown) -->
<iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
Sounds like the iframe must have id="__gwt_historyFrame" and cannot be changed to "AAAAA" or anything else.
You would have to build your own version of GWT with a custom implementation of HistoryImplFrame. And as other replies have stated, there really isn't a good reason to do this.
If you use the MVP architecture presented by Google, you won't need to change it in order to handle history. I don't see why you would want to change it but this look like a GWT Defined variable that you shouldn't change.