Error connecting to HybridAuth Facebook: "Invalid areas: offline_access, publish_stream, read_friendlists"

I am using a library HybridAuthwith CodeIgniter Bonfireto add Facebook login features. I added the library and all the necessary files related to it to Bonfire.

After clicking the "Log in with Facebook" button, I am redirected to the Facebook login page, but Facebook gives this error:

Invalid areas: offline_access, publish_stream, read_friendlists. This message is displayed only to developers. Users of your application will ignore these permissions, if any. Please see permissions documentation: https://developers.facebook.com/docs/facebook-login/permissions ..

How can i solve this?

+4
source share
4 answers

To develop @luschn's answer , the permissions that HybridAuthFacebook asks for by default (starting with version 2.4.1) email, user_about_me, user_birthday, user_hometown, user_website, offline_access, read_stream, publish_stream, read_friendlists.

Here's how to remove those discounted areas in the configuration file HybridAuth:

<?php
return
    array(
        'base_url' => 'http://localhost/your/hybridauth/endpoint/index.php',

        'providers' => array (

            'Facebook' => array (
                'enabled' => true,
                'keys'    => array ( 'id' => 'YOUR-APP-ID', 'secret' => 'YOUR-APP-SECRET-TOKEN' ),
                'scope'   => 'email, user_about_me, user_birthday, user_hometown, user_website, read_stream',
                'trustForwarded' => false
            ),
        ),
    );
+7
source

All of these areas / permissions are deprecated over the years - this is exactly what the error message reports, they simply do not exist. You need to check the docs on Facebook to find out what permissions you need. The API reference is a good place to search.

+5
source

@Arman H , email scope,

<?php
return
    array(
        'base_url' => 'http://localhost/your/hybridauth/endpoint/index.php',
        'providers' => array (
            'Facebook' => array (
                'enabled' => true,
                'keys'    => array ( 'id' => 'YOUR-APP-ID', 'secret' => 'YOUR-APP-SECRET-TOKEN' ),
                'scope'   => 'email',
                'trustForwarded' => false
            ),
        ),
    ); 
+3

just go to the application settings and update the version of your application, it should be at least 2.7

enter image description here

+1
source

All Articles