First clarify that goes wrong on my server connection with FaceBook I can usually write things on the application.
To start I decided to make one of phrases, sentences are like 6 random test and works well. I think the problem is that the function to publish on the wall and does not work, if I look at the Firefox Error Console fails
The code is:
<script>
function publish(){
var mensaje = "<?php echo $frases[$frase]; ?>";
var user_message_prompt = "Would you say something?";
var user_message = "What a great phrase!";
var attachment = {'media':
[{'type':'image',
'src':'http://-----.net/facebook/logo.gif',
'href':'http://apps.facebook.com/fraxedeldia/'}],
'name': mensaje +'<br />',
'description':'Discover your quote of the day'};
Facebook.streamPublish(user_message,attachment,'','',user_message_prompt);
}
publish();
</script>
Finally I say to launch automatically function to do without buttons and see if it works. Sometimes does not always fail and 95% of the other times does not work.
I would appreciate me pointed out the error in the code and not give me a link to the API or any website that may not understand.