I have createn an app, this app can be found here
Everything is working as should be apart fromt when someone uses the app for the first time. It produces the dialog to allow the user to see what type or permission I have requested using this –
$url = $facebook->getLoginUrl(array(
'canvas' => 1,
'req_perms' => 'publish_stream, email, offline_access',
'fbconnect' => 0
));
Once the user click OK they are then redirected to the URL where my app sits, instead of redirecting to the URL of the app within Facebook.
Other code I have that works with this app –
include_once("includes/src/facebook.php");
include_once("includes/src/facebook_config.php");
$facebook = new Facebook(array(
'appId' => FACEBOOK_APP_ID,
'secret' => FACEBOOK_SECRET_KEY,
'cookie' => false,
'domain' => 'syncro-it.co.uk'
));
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '<?=FACEBOOK_APP_ID?>',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Canvas.setSize();
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
Has anyone come across this before? If so am I missing somethign silly?
Try this :