i am making a facebook application, everything seems done. here is the sample flow(index.php):
seekpermission.php
processinfo.php
generateresult.php
poststatus.php(the javascript way as told in the documentation)
invitefriends.php(the javascript way as told in the documentation)
hope the names are self explanatory. the trouble is the dialogue to update status and invite friends comes almost parallely, but what i want is once the user publishes/skips the status message only then should the dialogue of invite friends should come. here is what i tried but it is not working, please help thanks!
FB.ui(
{
method: 'feed',
name: 'name goes here',
link: 'http://apps.facebook.com/****/',
picture: '<?php echo $imageurl; ?>',
caption: 'here is caption',
description: 'the description',
message: '<?php echo $charecter; ?>'
},
function(response) {
if (response && response.post_id) {
alert('<?php include "invitefriends.php"; ?>');
} else {
alert('<?php include "invitefriends.php"; ?>');
}
here is the invitefriends.php
<body>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js">
</script>
<script>
FB.init({
appId:'2****', cookie:true,
status:true, xfbml:true
});
FB.ui({ method: 'apprequests',
message: 'Folks check out my new facebook app!! visit http://apps.facebook.com/**** '});
</script>
</body>