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 8490429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:06:58+00:00 2026-06-10T22:06:58+00:00

I am using facebook registration on my web project. The registration works fine in

  • 0

I am using facebook registration on my web project.
The registration works fine in most of the cases, but sometimes the facebook iframe does not send the fbuid to the php script…

Is this a facebook bug? Any workaround?

Here is the facebook ifranme:

<iframe src="https://www.facebook.com/plugins/registration?
client_id=####&
redirect_uri=http://****/pre-login/facebook/fb_register_respond.php&
fields=name,email"
scrolling="auto"
frameborder="no"
style="border:none;display:block;"
allowTransparency="true"
width="350"
height="330">
</iframe>

In some registrations the fbuid is false.
If the user is not connected to facebook or is already registred with facebook, then the iframe will not be displayed.

Here is the php code:

define('FACEBOOK_APP_ID', '####');
define('FACEBOOK_SECRET', '####');

function parse_signed_request($signed_request, $secret) {
  list($encoded_sig, $payload) = explode('.', $signed_request, 2); 

  // decode the data
  $sig = base64_url_decode($encoded_sig);
  $data = json_decode(base64_url_decode($payload), true);

  if (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {
    error_log('Unknown algorithm. Expected HMAC-SHA256');
    return null;
  }

  // check sig
  $expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);
  if ($sig !== $expected_sig) {
    error_log('Bad Signed JSON signature!');
    return null;
  }

  return $data;
}

function base64_url_decode($input) {
    return base64_decode(strtr($input, '-_', '+/'));
}

if ($_REQUEST) {
    $response = parse_signed_request($_REQUEST['signed_request'], FACEBOOK_SECRET);

    // Die email Adresse des Users.
    $email = $response['registration']['email'];

    // Das Passwort (fb-user-id) des Users.
    $fbuid = $response['user_id'];
} else {

    // Im Fehlerfall.
    echo '$_REQUEST is empty';
    exit;
}
  • 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-10T22:07:00+00:00Added an answer on June 10, 2026 at 10:07 pm

    The registration works fine in most of the cases, but sometimes the facebook iframe does not send the fbuid to the php script…

    By default the Registration plugin allows users to not use their existing Facebook account to sign up for your service – they can delete the pre-filled data, and type in their own, or without even being logged in to Facebook (in which case they are offered a blank form at first, with the additional possibility to log into Facebook if they have an account).

    Logically, if the user chooses not to use their Facebook account, but just fill out the form with their own data – you get no Facebook user id transmitted to your server on submit, because there is none.

    If you don’t want this, and want users to only use their existing Facebook account to sign up (and thereby be sure to always get a FB user id) – then set the parameter fb_only to true while calling the Registration plugin.

    https://developers.facebook.com/docs/plugins/registration/

    “fb_only – Optional. (boolean) Only allow users to register by linking their Facebook profile. Use this if you do not have your own registration system. Default: false.”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Facebook Registration Plugin on my site, but I'm getting security errors
I'm using the Facebook Registration Plugin and it seems to have stopped working, but
I am integrating Facebook authentication, registration and app requests with our web app, using
i am using facebook registration to send some data to a post.php file: <?php
I am using the facebook registration plugin, but certain workplaces now ban facebook (such
I'm using Facebook Registration in my application. Is it possible to use customized layout
Under Django 1.1.1, I am using several authentication backends such as social-registration for facebook
I'm using both django-userena and django-facebook as my main registration apps. Let's inherit my
I am using Facebook-java-api to integrate the Facebook app in java web app(Struts), i
i´m developing a Facebook Fanpage using PHP-SDK 3.0 and integrated a Facebook Registration Plugin.

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.