I'm having a strange error with 'Send' button
I have the following code on my page
<div id="fb-root"></div>
<script type="text/javascript">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=<myAppId>";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<br/>
<fb:like send="true" width="450" show_faces="true"></fb:like>
The 'send' button works fine if I access the application via IP address, but if I use a domain name, Facebook returns
The page at http://<...>.com:8080/pages/question.jsf could not be reached because the server returned status code 401.
Meantime 'like' button works fine. The application front-end is built with JSF2+Primefaces.
Any ideas would be appreciated Thanks
EDITED: The first thing I found that 'send' button did not work when the application was deployed on port 8080. Once I changed the AS port to a standard one (80), the problem vanished from almost all pages but one. The strangest thing is that the button does not work on a page but once I call this exectly page with a parameter like the following
http://{some_url}.com?param_id=sometexthere
The button magically start working. If I just call
http://{some_url}.com
The 'send' button shows 401 error. On all other pages the button works fine.
Could please anyone spread some light on this. Thanks
Ok. All this is pretty wierd.
The first time I met this problem, I just changed the application server(AS) port from 8080 to 80. This solved the problem. As learned it later only partially. The error persisted on one page. I tried everything that I was able to imaging, including full cleanning of the application server working directories. Nothing led to any result. What finally solved the issue was clean AS instance. Unfortunatelly, I have no clue what exactly has happened there. The best guess is that after the application has grown up from closed betta and the authorization has been switched off, this change was not applied for some reason for a main page. It stack some where in the AS cache and was remaining even I removed all its temporary files.
The AS I'm useing is glassfish v3.1.2
Hope, this can save someone day or two of struggling with windmills