Problem/Motivation

Error: Call to undefined method Facebook\Facebook::getAuthorizationUrl() in Drupal\social_post_facebook\FacebookPostAuthManager->getAuthorizationUrl() (line 76 of modules/contrib/social_post_facebook/src/FacebookPostAuthManager.php)

Steps to reproduce

  • Enable and configure the module
  • Go to your user profile and edit it
  • Click on "Add account" under "Social Post Facebook"

Proposed resolution

The initSdk() function from social_post_facebook/src/Plugin/Network/FacebookPost.php is using the \Facebook\Facebook (from php-graph-sdk), it should use the \League\OAuth2\Client\Provider\Facebook class from the oauth2-facebook library.

CommentFileSizeAuthor
#3 3258724.patch4.88 KBeleonel
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

eleonel created an issue. See original summary.

eleonel’s picture

Assigned: eleonel » Unassigned
Status: Active » Needs review
StatusFileSize
new4.88 KB

I pushed a fix for that and now the error is gone, anyway still needs review.

j-barnes’s picture

Test and confirmed that I am no longer getting the above error. However after adding to the user I am getting the below prompt on Facebook and the app is never added. This might just be a non-issue and related to the settings in the actual Facebook app.

You Can't Use This Feature Right Now

We limit how often you can post, comment or do other things in a given amount of time in order to help protect the community from spam. You can try again later. Learn More

  • eleonel committed 8017bd0 on 3.0.x
    Issue #3258724 by eleonel: Message  Error: Call to undefined method...

megakeegman’s picture

Status: Needs review » Fixed

I have succeeded in adding a Facebook user to a Drupal account.

megakeegman’s picture

Status: Fixed » Closed (fixed)

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