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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:50:43+00:00 2026-05-25T23:50:43+00:00

Is anyone else noticing that facebook and twitters APIs aren’t working? For facebook even

  • 0

Is anyone else noticing that facebook and twitters APIs aren’t working?

For facebook even if I allow my application to have access to my wall

$facebook->getUser()

Is always 0… When I try to open getLoginUrl it just open pop-up and redirect it instantly to success return link…

Here is code:

require_once 'src/base_facebook.php';
require_once 'src/facebook.php';

$app_id = 'xxx';
$app_secret = 'xxx';

$facebook = new Facebook(array(
  'appId'  => $app_id,
  'secret' => $app_secret,
  'oauth' => true,
  'cookie' => true
));

$req_perms = "publish_stream";

$user = $facebook->getUser();

if (!$user)
    {
    $loginUrl = $facebook->getLoginUrl(array('display' => 'popup', 'redirect_uri' => 'http://xxxx.com/return_close.php?success=1', 'cancel_url' => 'http://xxxx.com/return_close.php?success=0','req_perms' => $req_perms, 'scope' => $req_perms));
    }

And for twitter it’s like someone mistyped return link…
When I open getAuthorizeURL and when I log in it redirects me to this URL:

https://twitter.comoauth_callback/?oauth_token=yA2xjLsVRm9tIuVEysXnCV8R7TISW8tF94uznn7zlw&oauth_verifier=Io1N2I8zOEzJeBWI77WXFMqmMRNDfCrXZGQxXmxJLbI

Yes, https://twitter.comoauth_callback/ is right, there is no / after .com, it’s together, so I get not found page…

It’s like both APIs have serious problems… Facebook sometimes work and sometimes doesn’t, it’s buggy a lot…

Facebook library downloaded from OFFICIAL GitHub page. Tried versions:

v3.1.1
v3.1.0
v3.0.1

And none of those work…


Update

Return URL ( redirect_uri ) MUST have facebook class included in file…

There is so many examples/documentations and none of those had this explained…

So, Facebook fixed… Twitter still not working…


  • 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-25T23:50:44+00:00Added an answer on May 25, 2026 at 11:50 pm

    Well, nothing is broken in the API. Where did you get the above code? and if you come up with it then based on what resource?

    First of all, take a look at the example of the OFFICIAL PHP-SDK, you’ll notice the following:

    1. Only the facebook.php file has been included, why not base_facebook.php? well because it’s included in the facebook.php file!
    2. Developers used to use req_perms but now to request permissions you just need to use scope
    3. Take a look inside base_facebook.php for the params the Facebook() class expect: appId, secret and fileUpload ONLY
    4. Only use the display parameter if you know what you are doing!
    5. Use proper indentation with your code, it makes your life (and others!) much easier!

    This been said, this is a rewrite of your code:

    require 'src/facebook.php';
    
    $app_id = 'xxx';
    $app_secret = 'xxx';
    
    $facebook = new Facebook(array(
      'appId'  => $app_id,
      'secret' => $app_secret
    ));
    
    $req_perms = "publish_stream";
    
    $user = $facebook->getUser();
    
    if (!$user) {
        $loginUrl = $facebook->getLoginUrl(array('display' => 'popup', 'redirect_uri' => 'http://xxxx.com/return_close.php?success=1', 'cancel_url' => 'http://xxxx.com/return_close.php?success=0', 'scope' => $req_perms));
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone else tried using SimpleModal in IE9? If so, have you experienced that
Has anyone else had this issue and found a working solution? I've enabled the
has anyone else experienced this . I have SP1 but i have to kill
Has anyone else experienced this? I have uninstalled and reinstalled TortoiseSVN as well as
Does anyone else think that the add view dialog in VS is useless or
I wonder if anyone else is facing the same issue. I have a UITextView
I don't know if anyone else even has this problem, or has noticed, but
Anyone else playing with ironruby? I have successfully got the IronRuby.Rails.Example project running on
Does anyone else have this problem or is my Delphi cursed somehow? I'll have
Does anyone else have infuriating usability issues while trying to work with MonoDevelop in

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.