Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8396985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:40:39+00:00 2026-06-09T20:40:39+00:00

I am confused with this plugin . Just copy-paste the demo, but I am

  • 0

I am confused with this plugin.

Just copy-paste the demo, but I am getting this error when i am trying to connect with facebook:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

full code:

<?php

class ExamplesController extends AppController {

  public $components = array(
    'Auth'=> array(
      'loginAction' => array(
        'controller' => 'examples',
        'action'     => 'login'
      ),
      'loginRedirect' => array(
        'controller' => 'examples',
        'action'     => 'my_account'
      ),
      'authError' => 'Did you really think you are allowed to see that?',
      'authenticate' => array(
        'FacebookAuth.Facebook' => array(
          'fields' => array(
            'username' => 'email',
                'password' => 'password'
          )
        )
      )
    )
  );

    public function index() {
    }

  public function beforeFilter()
  {
    parent::beforeFilter();

    $this->Auth->authenticate['FacebookAuth.Facebook']['application'] = array(
      'id'     => Configure::read('facebook.app_id'),
      'secret' => Configure::read('facebook.app_secret')
    );

    $this->Auth->allowedActions = array_merge($this->Auth->allowedActions, array('login'));
  }

  public function login()
  {
    if (!$this->Auth->login()) {
      /**
       * Get config for Facebook redirect
       */
      $clientId    = Configure::read('facebook.app_id');
      $permissions = implode(',', Configure::read('facebook.permissions'));
      $redirect    = Router::url(false, true);
      $csrfToken   = CakeSession::read('FacebookAuthCSRF');

      $this->redirect(Configure::read('facebook.oauth_dialg_url') . '?client_id=' . $clientId . '&redirect_uri=' . $redirect . '&scope=' . $permissions . '&state=' . $csrfToken);
    } else {
      $this->redirect(array('action' => 'my_account'));
    }
  }

  public function my_account()
  {
    var_dump($this->Auth->user());
    die();
  }
}

the challenge is to figure out how to put the plugin working.


UPDATE:
Ok, i have this url (thanks to elliot):

http://someHost/?client_id=4003xx16796&redirect_uri=http://localhost/cake/users/login&scope=email&state=f96419881df77cdc689e6c43c131cf3b

Now, what is supposed to do with the url? The next step, basically. What I have is just a loggin button, that when clicked change the url, like the demo above, but without any action. The response is empty.

I already read this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:40:40+00:00Added an answer on June 9, 2026 at 8:40 pm

    Is the issue

    Configure::read('facebook.oauth_dialg_url')
    

    Should read:

    Configure::read('facebook.oauth_dialog_url') 
    

    Also make sure you’re making the appropriate Configure::write commands in bootstrap.php

    Configure::write('facebook.oauth_dialog_url', 'http://some-value.com/path/to/url');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just added a Facebook Like/Send plugin onto my page. I QA'd the plugin
I am trying to develop plugin using jquery-boilerplate-v3.1 and confused between this and $(this)
I'm confused about this. Most of us have been told that there isn't any
just a bit confused by this code var counter = function() { //... var
I just started the Plugin development for the Wordpress, but finding it little difficult
Sorry this is my first time trying to create a plugin, so I might
Sorry for this simple questions but i am too much confused with how to
I'm trying to use sencha touch's listpaging plugin. But there is almost no good(
Hi I'm trying to use the CakePHP comments plugin found here http://cakedc.com/downloads/view/cakephp_comments_plugin but the
Totally confused by this one... We have a WAMPServer installation set up, running a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.