Facebook Graph API using ASP.NET with fancybox - facebook

Anyone know of some trick I can use to get facebook to authenticate a user within a fancybox iFrame? ... when I use the following code facebook dosent present the user with a login box, rather it gives them a link to facebook which puts the user back in the parent window
<a id="aFbLogin" href="https://graph.facebook.com/oauth/authorize?client_id=XXX&redirect_uri=http://ahost.com/callback.aspx&scope=email" type="text/html"><img style="border-style: none"
src="/Images/fBookLogin.png" alt="FaceBook Login Button"
title="Login with FaceBook" id="btnFbLogin" height="36" width="67" /></a>
Then some JavaScript to add the click event handler ... the pop up works .. but Facebook seems to not like being in an Fancybox-iFrame

Facebook has various measures (using css and javascript) in place to ensure that it is never hosted in an iframe. I'm afraid you are limited to using the popup implementation provided with the javascript sdk.

Related

Implementing Facebook's "Continue As {Name}" using FB Web API

I would like to implement the Facebook "Continue as {Name}" feature as described on this page: https://developers.facebook.com/docs/facebook-login/web/login-button/
However, my current implementation does not use the <div class="fb-login-button" ...></div> method as shown in that page. I login using the FB SDK manually. I would like to keep this implementation if possible.
My question is: is it possible to retrieve the users' name without asking for permission from my app?

How do I detect if adblock is preventing "Signin with Facebook" in nopcommerce?

I'm using the Signin with Facebook plugin with Nopcommerce here:
http://favalife.azurewebsites.net/login
I noticed that in Chrome, the facebook button doesn't appear if Adblock is running.
What can I do to make the front-end look "better" or be more functional and allow for Facebook logins while Adblock is hiding the image, and/or the following code:
<a href="/Plugins/ExternalAuthFacebook/Login?ReturnUrl=%2Fcart" class="facebook-btn">
</a>
You can add apporpriate styles to \Plugins\ExternalAuth.Facebook\Content\facebookstyles.css file

facebook registration plugin - show on click only?

I am trying to implement the FB registration plugin on my site but it is active/opened by default. is there a way to have it open only when a user clicks on the Register/Login button instead?
Put it in a hidden div and then show the div when you want to with javascript
Put this on the page where you want Register button to be displayed:
<fb:login-button registration-url="http://yoursite.com/facebookregistration" />
facebookregistration page should have the registration form:
<fb:registration
fields="[
{'name':'name'},
{'name':'email'},
{'name':'gender'},
{'name':'birthday'}
]"
</fb:registration>
For more information refer to Facebook Developers page

Opening Facebook dialogue box in the same page

I have been trying to implement the Facebook Feed Dialog as follows
<a href="http://www.facebook.com/dialog/feed?app_id=12345678&redirect_uri=http://example.com&link=http://example.com&message=Hi+wassup!">
But the problem is it is opening the link in a page, rather than a pop up box.
Pls help!
To do this as a dialog, you would need to use the Facebook Javascript SDK and call the FB.ui function using the 'feed' value for method.

Facebook like button count not updating at all

I'm having a problem with the good ol' facebook like button on my site. I've implemented it all, I can click on "like" and it appears on my wall (and on the site the count pops up to say "1"), but the count never updates. If I refresh the page it just shows the "like" button again (no count), and if I log in to facebook with a new account and click on like again, it just says "1" again.
An example page on my site:
http://www.makemeacocktail.com/recipe/6741/
The fql readout (watch the apostrophe escape here, copy and paste dont just click):
https://api.facebook.com/method/fql.query?query=select%20total_count,like_count,comment_count,share_count,click_count%20from%20link_stat%20where%20url='http://www.makemeacocktail.com/recipe/6741/'&format=json
The FB XML that is being used:
<fb:like href="http://www.makemeacocktail.com/recipe/6741/" send="false" layout="button_count" width="50" show_faces="false" font="arial"></fb:like>
Other facebook thoughts etc:
I've got the facebook open graph meta data in the head
The js call to facebook happens as the last thing on my page, after the FBML:
<script src="http://connect.facebook.net/en_US/all.js#appId=187430904631019&xfbml=1"></script>
<script>
FB.init({
appId : '187430904631019',
status : true,
cookie : true,
xfbml : true
});
</script>
I've also got the facebook page like at the bottom of my page:
<div id="fb-root"></div><fb:like-box href="http://www.facebook.com/makemeacocktail" width="292" show_faces="false" stream="false" header="true"></fb:like-box>
Which is where the fb-root is.
My only thought it something about fb-root not being next to the facebook like button earlier up, and a conflict of two facebook like buttons or something? I;m only calling the facebook js once though, right at the bottom.
Any thoughts help etc much appreciated. It is weird because it it going to my wall, but the button on the site isn't listening!
Thanks a lot
Got this from the request your like button sends to facebook:
App ID does not match domain","full":"The app ID specified
within the \"fb:app_id\" meta tag is
not allowed on this domain. You must
setup the Connect Base Domains for
your app to be a prefix of
http:\/\/www.makemeacocktail.com\/recipe\/6741\/
So, you need to change the base domain for your application in the developers application to makemeacocktail.com. If that is not the problem try removing the fb:app_id open graph tag, or use the fb:admins tag instead. Good luck, hope this helps.