views:

59

answers:

1

I have the following code in my appinclude.php file and for some reason the app keeps redirecting forever and firefox gives me an error that the redirect will never end.

I am not sure if i am missing something but i have tried to change the redirect_uri to the directory on my server where the app is hosted but i get an error from facebook and i have also tried https://apps.facebook.com/gamesorbiter/ but that didnt work :(

I am totally lost, any help is appreciated.

$facebook = new Facebook($appapikey, $appsecret);
$user = $facebook->require_login();
$facebook->redirect('https://graph.facebook.com/oauth/authorize?client_id=132611566776827&redirect_uri=http://apps.facebook.com/gamesorbiter/&scope=publish_stream');
A: 

First, I recommend you to look at the sample code, provided by facebook on their PHP SDK page on github.

Then, if you still have issues with getting your app authenticated, check out this article - it gives concise break down of the authentication process and offers a solution to one of the common problems, developers face with code samples:

http://balaganof.blogspot.com/2010/09/facebook-application-development.html

Ilya