tags:

views:

93

answers:

2
+1  Q: 

Facebook App Login

Hello Community,
I downloaded the API from Facebook and tried to login with it.
I get an loop which try to authentificate me all the time ( link text )

How can I login with facebook without getting this loop? ( I finally want to get my notifications and messages an i want to post something. )

Greets Dom

A: 

Hi Henrik

<?php
require('config.php');
require_once('api/facebook.php');

$facebook = new Facebook($api_key,$secret);

$fb_user = $facebook->require_login();

?>

Hello <fb:name uid='<?php echo $fb_user; ?>' useyou='false' possessive='true' />! Welcome to my first application!

<?php

    echo "<pre>Debug:" . print_r($facebook,true) . "</pre>";

?>

thanks for help!!

greetz

Dominik K.
+1  A: 

you need request for api key and secret code from facebook developer site/app (http://www.facebook.com/developers/). in the code you mentioned, $api_key and $secret should be initialized with your api and secret code. Cheers!

biluriuday