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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:47:10+00:00 2026-05-29T15:47:10+00:00

Im trying to develop a new FB App, however it seems they have changed

  • 0

Im trying to develop a new FB App, however it seems they have changed their ways once again.
Im looking for the correct way to authenticate a fb user to my app, and retrieve the userid.

I have found the following method:

// Authenticate the user
session_start();
if(isset($_REQUEST["code"])) {
   $code = $_REQUEST["code"];
}

if(empty($code) && !isset($_REQUEST['error'])) {
$_SESSION['state'] = md5(uniqid(rand(), TRUE)); //CSRF protection
$dialog_url = 'https://www.facebook.com/dialog/oauth?' 
  . 'client_id=' . $app_id
  . '&redirect_uri=' . urlencode($app_url)
  . '&state=' . $_SESSION['state']
  . '&scope=publish_actions';

print('');
exit;

My question is now.
Do i not need the facebook SDK at all ? Since its not needed here im thinking its not needed at all.
Would the correct way be to put this code in top of all my documents, thereby constantly making sure the user is authorized ?

Thank you

  • 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-05-29T15:47:12+00:00Added an answer on May 29, 2026 at 3:47 pm

    Maybe you are looking for this

    It will require something like this:

     <div id="fb-root"></div>
     <script>(function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "http://connect.facebook.net/de_DE/all.js#xfbml=1&appId=<YOUR_APP_ID>";
            fjs.parentNode.insertBefore(js, fjs);
         }(document, 'script', 'facebook-jssdk'));
     </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to android and am trying to develop an app. I have
I am new to iphone development. I am trying to develop an alarm app,
Im trying to develop my first ASP.NET MVC web app and have run into
I am trying to develop an app with a camera. I have already successfully
Well I am trying to develop a memo or notebook app with a new
I am very new to java and trying to develop an Android app called
I'm trying to create a new app on heroku but it seems no matter
I am quite new to iOS development and trying hard to develop an App.
I am trying to develop an iPad app in which I need to have
I have been trying to develop an app that will deal with content providers

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.