简体   繁体   中英

Zend Framework 2 authentication using Facebook

I am using SocalNick/ScnSocialAuth ( https://github.com/SocalNick/ScnSocialAuth ) library with Zend Framework 2 for my project. While I am trying to login using Facebook I am getting folowing error message.

Fatal error: Call to a member function getState() on a non-object in D:\\php\\htdocs\\test\\vendor\\socalnick\\scn-social-auth\\src\\ScnSocialAuth\\Authentication\\Adapter\\HybridAuth.php on line 144

I am trying hard to find out the root of this problem, but could not find any solution so far.

Can any one say what can be the solution??

Thanks

From what info you've provided it seems that the Entity you have defined for Authentication has a member variable 'state' but no method to get it. (ie getState()).

Assumptions here include that you're using ZfcUser and you're probably overwriting the entity.

'user_entity_class' => '<mymodule>\Entity\User',

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM