Hello,

I have been using hybridauth on D7 perfectly fine. But on D6, I have a typical issue of facebook showing a white screen on load. G+ and twitter work fine. Test URL is - http://ss.acelincreations.in/.

Please help.
Thanks,
rina

CommentFileSizeAuthor
fb.png6.35 KBrinashah

Comments

alemadlei’s picture

I have a similar issue with a Drupal 6 installation, but I'm not sure if it is the same one you are getting.

So I was checking the generated FB url, and it ends up being something like


https://www.facebook.com/dialog/oauth?client_id=1497258043839806&redirec...

I was wondering about the repeating ",0" in the URL. So I checked where they load the configuration. And it seems it is stored in hybridauth_provider_Facebook_scope

After checking the variable it turns out that it has a similar structure to this:

    [user_about_me] => user_about_me
    [email] => email
    [offline_access] => offline_access
    [publish_stream] => publish_stream
    [user_activities] => 0
    [user_birthday] => 0
    [user_checkins] => 0
    [user_education_history] => 0
    [user_events] => 0
    [user_groups] => 0
    [user_hometown] => 0
    [user_interests] => 0
    [user_likes] => 0
    [user_location] => 0
    [user_notes] => 0
    [user_online_presence] => 0
    [user_photos] => 0
    [user_questions] => 0
    [user_relationships] => 0
    [user_relationship_details] => 0
    [user_religion_politics] => 0
    [user_status] => 0
    [user_videos] => 0
    [user_website] => 0
    [user_work_history] => 0
    [read_friendlists] => 0
    [read_insights] => 0
    [read_mailbox] => 0
    [read_requests] => 0
    [read_stream] => 0
    [xmpp_login] => 0
    [ads_management] => 0
    [create_event] => 0
    [manage_friendlists] => 0
    [manage_notifications] => 0
    [publish_checkins] => 0
    [rsvp_event] => 0
    [sms] => 0
    [publish_actions] => 0

So, it seems that when these settings are built into the FB URL, those 0 are added.

What I did is that I added a submit handler for the settings form, on a custom module, and I clean up the values before they get stored.

Similar to this


/**
 * Cleans up FB settings for hybrid auth.
 */
function fb_settings_cleanup($form, &$form_state){
  
  // Cleans up scope values for FB integration.
  foreach (array_keys($form_state['values']['hybridauth_provider_Facebook_scope']) as $key){
    if (!$form_state['values']['hybridauth_provider_Facebook_scope'][$key]) {
      unset($form_state['values']['hybridauth_provider_Facebook_scope'][$key]);
    }
  }
    
}

After doing this, it began to work as expected.

Hope this helps soimeone.

duozersk’s picture

Priority: Major » Normal
Status: Active » Fixed

If the reason for the issue is what is explained in the #1 above then it should be fixed in the 6.x-1.x-dev release as it does array_filter() on the Facebook scope settings array.

Thanks
AndyB

alemadlei’s picture

The Drupal site I was working on has 6.x-2.0.

Regards,

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.