PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, February 27, 2022

[FIXED] Getting error Argument 1 missing for FacebookRedirectLoginHelper

 February 27, 2022     facebook, facebook-php-sdk, php     No comments   

Issue

I am trying to the new Facebook api. I using the Facebook's own tutorial as my guide. The tutorial in the Facebook developer's site asks us that after we are redirected to from Facebook we should get a $helper. The code for that is given there. It is

$helper = new FacebookRedirectLoginHelper();

But I am getting an error. It says argument 1 missing for the __construct of FacebookRedirectLoginHelper(). What am I doing wrong? I need it to write my paper.


Solution

It's missing from the docs, but the first argument is the callback URL and it is required. Here's the source code.

$helper = new FacebookRedirectLoginHelper('https://example.com/facebook/callback');

Someone just submitted a PR to fix the docs.



Answered By - SammyK
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing