Facebook Registration PLugin question - facebook

I'm working on using the fb registration plugin on my sites. Sometimes a site doesn't support iframes. Is there another version of this script below that works without iframes or is there a workaround?
<iframe src="https://www.facebook.com/plugins/registration.php?
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>
thanks for any help

I don't understand what you mean by the idea that a site 'doesn't support iframes', but to answer your question, the Registration plugin is only available as an iFrame and i'm not aware of any other way to use it.
There's no reason you couldn't implement the Registration plugin's functionality yourself using the regular APIs if you needed to for some reason. The registration plugin just optimises a particular use-case ('sign up for a site with the possibility of using Facebook account information') and makes it faster to implement.

Yes there is. You can use the XFBML version of the plugin. This allows you to not only do what you are asking but to validate custom fields. This is what I choose to use on my application. However, I am not sure if fb is going to deprecate this or not come Jan 1st. Considering there is no replacement, it would be a little messed up if they did. For information on how to use and implement this see this link:
http://developers.facebook.com/docs/plugins/registration/advanced/
Brandon

Related

Comment to url API

I am using Facebook Comments plugin in my website:
http://developers.facebook.com/docs/reference/plugins/comments/
by add this to my web :
<div class="fb-comments" data-href="http://example.com" data-num-posts="2" data-width="470"></div>
And i want to use it also in my android app, Can i use Facebook API or something else that i can make a comment on a URL without using the Comment plug-in.
Its impossible but comment plugin will show mobile version automatically for mobile devices
The mobile version will automatically show up when a mobile device
user agent is detected. You can turn this behavior off by setting the
mobile parameter to false. Please note: the mobile version ignores the
width parameter, and instead has a fluid width of 100% in order to
resize well in portrait/landscape switching situations. You may need
to adjust your CSS for your mobile site to take advantage of this
behavior. If preferred, you can still control the width via a
container element.
You can use the Graph API with stream_publish permission from the user in order to publish comments on their behalf. You can read the following docs to see how that works:
https://developers.facebook.com/docs/reference/api/post/#comments

Invites on timelines using XFBML

In my application I am displaying custom invite dialog. This is achived by using FB.XFBML.parse method which parses FBML fb:serverFbml with other content that is responsible for displaying multi-user list.
On the side of app all looks good, invites are delivered.
But users that switched already to timeline have problem with accepting requests done this way. They cannot click on it and enter the app or even remove it. Users that are not using timeline yet can use this method to access app.
Below screen with not working example and part of edited code I am using:
Link to image
This is code copied from browser:
<form method="POST" target="" action="http://application_link/index.php/player/invitedfriend" content="Some content <fb:req-choice label='Example label' url='http://apps.facebook.com/app_name/' /> " type="closer" invite="true" id="req_form_4f840...">
I know that FBML is deprecated and won't be supported starting June 1 but based documents facebook provides I should be able to use fb:serverFbml without any problems thanks to FB.XFBML.parse. Any idea what might be wrong / solution to this? I would rather not want to use standard facebook dialogs.
Thanks
You should enable Requests 2.0 for your application (if not already enabled) and use the new approach to send invites. The Requests Dialogs page can help you out. The code to use the new method is quite simple too:
FB.ui({method: 'apprequests',
message: 'My Great Request'
}, requestCallback);
The new approach has more advantages than the old FBML version. XFBML is the website version of FBML. Both will be removed in June so you should switch to the above method ASAP.

Fb.Share does not work

Till yesterday everything was working fine.
In my website's head there was
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
and links like
<a name="fb_share" share_url="http://mysite.com/url"></a>
were transformed to facebook share plugins.
But now there is a problem - i can't see count of shares in plugin. I sniffed requests a little and the error is:
fb_sharepro_render({"error_code":104,"error_msg":"Requires valid signature","request_args":[{"key":"v","value":"1.0"}
I did not change anything on website and problem still occurs. Any hints?
Edit (probably an answer):
This bug is described here: http://bugs.developers.facebook.net/show_bug.cgi?id=19471
Facebook team response:
Thanks for the report. We are looking into this.
We recommend to use the like button instead as we are going to deprecate the
share button soon. The like button provides you with the same functionality and
more ...
http://developers.facebook.com/docs/reference/plugins/like/
Also, works solution with request to http://graph.facebook.com/?ids=*.
For example, while issue is not fixed by facebook, you can use a little modified facebook share widget script, it use a graph.facebook.com instead of api.facebook.com/restserver.php.
You have to introduce access_token also as a parameter. Find what facebook says
GET /fql?q=SELECT+uid2+FROM+friend+WHERE+uid1=me()&access_token=...

Does facebook support oEmbed?

Anyone know whether Facebook supports oEmbed for embedding videos (or other media) when a link is shared. I googled but cant get a definitive answer for this.
My question Facebook developer forum has no answer. http://forum.developers.facebook.net/viewtopic.php?pid=334549
Yes Facebook supports oembed. You can checkout the documentation here..
https://developers.facebook.com/docs/plugins/oembed-endpoints
Note: In order to make this API work properly with ajax calls on mobile devices; You need to use the endpoint domain "apps.facebook.com" instead of "www.facebook.com":
https://apps.facebook.com/plugins/post/oembed.json/?url={content-url}
This is because if you use the endpoint that is provided in the official documentation "www.facebook.com" the User agent of the mobile devices will force the redirect to "m.facebook.com" which does not have this endpoint implemented.
Embedly is paid. Free alternative is Noembed. :)
No, there is no current support for oEmbed. You have two options (maybe more, but two that I know of):
Embedly http://embed.ly/
Engineer yourself an embedding solution for Facebook using the standard form of Facebook video embeds, eg:
http://www.facebook.com/photo.php?v=VIDEOID&set=t.SOMENUMBER&type=2
becomes
<object width="400" height="300" ><param name="allowfullscreen" value="true" /><param name="movie" value="http://www.facebook.com/v/VIDEOID" /><embed src="http://www.facebook.com/v/VIDEOID" type="application/x-shockwave-flash" allowfullscreen="true" width="400" height="300"></embed></object>
The support is drastically changing in late 2020, to prevent anonymous access, and instead require a developer account and access token. https://developers.facebook.com/docs/plugins/oembed
Yes it does, but has few hiccups when implementing. I'd recommend you to try solution I wrote to overcome this: https://shobhitsharma.github.io/embedo

Facebook "like" button on comments

Is it possible to implement the Facebook like and share functionality for "liking" the comments of other users on a website? Does every comment has to have a permalink?
I have asked the question on Facebook developers forum, and they have come back to me with this response. Basically, the functionality that is required is not available.
http://forum.developers.facebook.net/viewtopic.php?pid=316205#p316205
Intro:
You will need individual like buttons for every comment, and as #Fnatte says you can then reference them to the comment by giving it an ID like #com1,#com2etc...
The best way to achieve this is through a for loop (I imagine you are pulling from a DB) that will iterate through and add the relevant code for the like button and implement the URL based on the comment it is pulling,
The Code:
You have 2 options, <iframe>:
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fexample.com%2Fpage%2Fto%2Flike&layout=button_count&show_faces=false&width=90&action=like&font=segoe+ui&colorscheme=dark&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
This is VERY slow, especially if you have a lot of comments loading at the same time, it does mean you don't need to import their JS library though,
Then there is the FB JS SDK:
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://example.com" layout="button_count" show_faces="false" width="90" font="segoe ui" colorscheme="dark"></fb:like>
This I would argue is a more eficcient way of doing things, but it does require a bit more time and effort - but will be well worth it.
The script of course can be imported only once in the head and then used multiple times throughout the page (perfect for what you need).
The URL to like is based on both the URL in the address bar and the ID that you have assigned to the code (e.g. #comment1) so the URL you are liking looks like this: http://mypage.com/page#comment1
Further Reading:
http://developers.facebook.com/docs/reference/plugins/like/
http://developers.facebook.com/docs/reference/javascript/
http://developers.facebook.com/docs/plugins/
Good luck and I hope this helps!
DEMO & SOURCE http://so.devilmaycode.it/facebook-like-button-on-comments/
updated, hope this help
I have never done it myself but you should probably check out http://developers.facebook.com/docs/guides/web#plugins.
It looks like you would need a unique link for each comment.
You could try including a fragment identifier in every URL like:
http://domain.com/article1#comment1
http://domain.com/article1#comment2
Facebook has rolled out a new version of the comments plugin which supports advanced functionality such as "liking" and replying to other comments. In addition, replies to a comment made on Facebook.com are now pushed back to the comments plugin (hosted on another site.)
How to enable:
Add the migrated attribute:
<fb:comments xid="YOUR_XID" migrated="1"></fb:comments>
OR use the href attribute instead of xid for future comments boxes
<fb:comments href="YOUR_CANONICAL_URL"></fb:comments>
References:
New <fb:comments>
Legacy <fb:comments>