Facebook Javascript SDK not working on Page - facebook

It seems the javascript SDK is not working at all on my domain. The like box no longer works... This happened after I created an app canvas page, I think.
I'm trying to use FB.ui on my apps canvas page but nothing with the FB js SDK is working. I figured it might be a javascript problem so I removed all of the jquery / mootools but no luck.
One thing is I don't have a secure URL yet, could this be my problem?

Secure URL is not the issue. Please check the Error console to see the errors thrown? To resolve FB Undefined issue try loading that asynchronously as suggested by facebook use the code provided here http://developers.facebook.com/docs/reference/javascript/

Related

Facebook form app inside iframe loses cookies for Safari browsers in Windows platform

I have a facebook app built using iframe. It works ok on most modern browsers except Safari on Windows platform. On Safari windows platform, the cookies seem to get lost as a user move from initial form page to 2nd page with questions.
Here is the live link
http://on.fb.me/1hCfgOX
Can someone help me on how to fix this?
Ok, i found a fix for it which works perfectly. Checkout the following links:
Safari 3rd party cookie iframe trick no longer working?
Facebook Iframe App with multiple pages in Safari Session Variables not persisting
And
http://lightyearsoftware.com/2009/11/on-the-pain-of-developing-for-facebook/
I hope this will fix your issue also, as it fixed mine. If you got any problem, let me know.
Thank you
besides header, you might also need to add w3c/p3p.xml and w3c/policy.p3p files to your website. See here for more details and sample files: Session null in IFrame in ASP.net MVC only in safari browser

web plugin like box browser issues

On my website, I am able to see the plugin in Chrome while others cannot. No one is able to see the plugin in IE. I tried using the iframe code and now I am using the HTML5 code. Any ideas?
http://craftcaferochester.com/
Thanks a lot!
This is probably your problem:
FB.getLoginStatus() called before calling FB.init().
I saw it in Chrome console. To resolve, see this:
FB.getLoginStatus() called before calling FB.init() error in console
Update:
You should register at Facebook Developers to obtain the appId and channelUrl. Go to JavaScript SDK and read the Loading and Initialization section. When you registered as a developer, you may obtain them from App Dashboard.

OAuth facebook pagetab app error

I'm totally stuck on this one..
I cant get js sdk or even the oauth link working..
When I try the oauth example, it works just fine:
https://www.facebook.com/dialog/oauth?scope=email,user_birthday&client_id=123050457758183&redirect_uri=http://www.example.com/response/&response_type=token
but in my case:
https://www.facebook.com/dialog/oauth?scope=email,user_birthday&client_id=317872318261965&redirect_uri=http%3A%2F%2Fwww.facebook.com%2Fpages%2FDigiComm%2F185749568187479%3Fsk%3Dapp_317872318261965&response_type=token
the link is basically the same, but get's an error
I've been fighting with this for days.. And can't understand, what could be the problem,
because each time i try to open the auth dialog with js sdk i get this same error..
It must be an error in the app settings on facebook side, but i cant understand what..
I'd say i have the same problem as this guy..
but as i can see he hasnt gotten any answer too:
Using OAuth dialog for facebook app do not allow to use canvas URL as redirect_uri
You need to make sure that the canvas/tab/website URL's in the developer app (https://developers.facebook.com/apps/317872318261965) match the redirect URI in your url.
At the moment, your link is pointing to http://www.example.com - you need to point this to wherever your app is hosted.
try to add http://www.example.com/ with all the slashes as website and example.com as app domain
Update:
If it is a canvas app your redirect_uri should be:
urlencode("http://apps.facebook.com/MY_APP_NAMESPACE/");

facebook-c#-sdk rendering unwanted html tags

I'm trying to get a simple facebook application to work, based on the downloaded example projects. The code prints some javascript code which makes perfect sense. The problem is it wraps it in a tag, and also prints a body tag. These things mess up facebook fbml apps, so that when I try to run the application through facebook I get this error:
FBML Error (line 3): illegal tag "body" under "fb:canvas"Sorry, the application you were using is experiencing a problem. Please try again later.
When viewing the source I can see that the problem is the injected html and body tags. Am I doing something wrong? How do I get the sdk to print the javascript without printing these extra tags?
Thanks a lot!
First off, the Facebook C# SDK does not support FBML applications. Facebook is deprecating FBML. I would strongly suggest building an iFrame app if possible. That being said, the Facebook C# SDK has nothing to do with the html markup. Simply remove the html markup from your master page.
You should be able to get the Facebook C# SDK working with FBML, but again we do not support it and I would not recommend spending time developing a new app on a technology that is being deprecated.

Facebook iFrame app - How to use fbml/xfbml

I'm trying to use xfbml within my facebook app (iframe) but it somehow doesn't show up.
I copied this tag into one of the pages...
<fb:share-button href="http://apps.facebook.com/example" type="box_count"></fb:share-button>
..but as i said it doesn't show up.
Any idea how that works?
Thanks in advance!
Are you loading the Facebook Connect javascript libraries? fbml is not going to render without Facebook's javascript parsing it.
Try this tutorial (its German) but there are Code-Snippets:
http://www.my-digital-home.com/2010/06/09/facebook-xfbml-leicht-gemacht/
how and where we must load the Facebook Connect javascript libraries?