开发者

Facebook App Login

开发者 https://www.devze.com 2022-12-15 19:34 出处:网络
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 )

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 finall开发者_运维知识库y want to get my notifications and messages an i want to post something. )

Greets Dom


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!


<?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>";

    ?>
0

精彩评论

暂无评论...
验证码 换一张
取 消