Facebook app submit action type
Posted
by
Axel
on Stack Overflow
See other posts from Stack Overflow
or by Axel
Published on 2012-06-18T15:11:58Z
Indexed on
2012/06/18
15:16 UTC
Read the original article
Hit count: 434
I've been reading about this on StackOverflow and facebook doc, yet I dont seem to be able to submit my action type.
I have the following code from the FB doc
<script type="text/javascript">
console.log("Function begins");
function postForm()
{
console.log(FB);
FB.api(
'/me/concoursvelirium:form',
'post',
{ recipe: 'http://concours.gestev.com/fbvel2012/form.php' },
function(response) {
console.log("Stay");
if (!response || response.error) {
console.log("error: " + response);
} else {
console.log('Cook was successful! Action ID: ' + response.id);
}
});
}
</script>
I have added my values from FB autogenerated values:
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# concoursvelirium: http://ogp.me/ns/fb/concoursvelirium#">
<meta property="fb:app_id" content="194081877384051" />
<meta property="og:type" content="concoursvelirium:form" />
<meta property="og:url" content="Put your own URL to the object here" />
<meta property="og:title" content="Sample Form" />
<meta property="og:image" content="https://s-static.ak.fbcdn.net/images/devsite/attachment_blank.png" />
And yet I see no output in the console past the console.log(FB);
I have no idea what I'm doing wrong. I'm also getting the Unsafe JavaScript attempt to access frame with URL
error, but I have read here that I should just ignore it.
Ty, Axel
© Stack Overflow or respective owner