Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Facebook registration plugin

Options
  • 29-10-2011 1:49pm
    #1
    Registered Users Posts: 459 ✭✭


    If anyone could kindly nudge me in the correct direction I'd be greatly appreciate it.

    The sheer amount of (outdated) info on facebook-connect and methods that are no longer standard is mind-boggling, simply what I want to do is:

    From my website --> ask user to register/connect with FB account --> INSERT username and email into my MySQL schema...

    The Facebook Registration Plugin claims to do this but goes as far as issuing a "signed_request" and any or all of the info out there talks of "connect Url's" in the app CP which are n0 longer there?

    For example, here's a tutorial titled 'How to Authenticate Users With Facebook Connect' from Jun 10th 2010

    I fail at the first hurdle
    [PHP]<?php
    # We require the library
    require("facebook.php");

    # Creating the facebook object
    $facebook = new Facebook(array(
    'appId' => 'YOUR_APP_ID',
    'secret' => 'YOUR_APP_SECRET',
    'cookie' => true
    ));

    # Let's see if we have an active session
    $session = $facebook->getSession();

    if(!empty($session)) {
    # Active session, let's try getting the user id (getUser()) and user info (api->('/me'))
    try{
    $uid = $facebook->getUser();
    $user = $facebook->api('/me');
    } catch (Exception $e){}

    if(!empty($user)){
    # User info ok? Let's print it (Here we will be adding the login and registering routines)
    print_r($user);
    } else {
    # For testing purposes, if there was an error, let's kill the script
    die("There was an error.");
    }
    } else {
    # There's no active session, let's generate one
    $login_url = $facebook->getLoginUrl();
    header("Location: ".$login_url);
    }
    ?>
    [/PHP]
    ...nothing but blank page - I can't even find where to enter connect Url in app CP.


Advertisement