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, it now looks like this:
<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:title" content="Concours Vélirium" />
<meta property="og:image" content="http://www.velirium.com/++resource++snowjamboree.theme.images/velirium-avatar-128x128.png" />
<meta property="og:description" content="Concours Vidéotron au Vélirium" />
<meta property="og:url" content="http://concours.gestev.com/fbvel2012/form.php" />
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
I finally found the issue, and it’s not that hard, provided you don’t read too much facebook’s doc. Even tough they give you a
POSTcommand and a JS code to validate your action, I wasn’t able to validate mine. Tough there’s an easier way to submit actions for approval:link(remember.. action type, not the object type “get code” button)
linux terminal If you got an output like: {“id”:”[YOUR-ID-NUMBER]”}
congratulations, you can now submit your action!
GL HF everyone