除了當我登錄(使用Facebook)與用戶沒有對應關係的數據庫(FOSUserBundle)時,幾乎所有工作都在我的項目中很好地工作,我只被重定向到/ registration/{id}得到一個錯誤:HWIOAuthBundle的PathUserResponse錯誤
The form's view data is expected to be an instance of class Naroga\Reader\CommonBundle\Entity\User, but is an instance of class HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class HWI\Bundle\OAuthBundle\OAuth\Response\PathUserResponse to an instance of Naroga\Reader\CommonBundle\Entity\User.
我也不得不改寫connect.confirm.html.twig刪除以下行:
{% if userInformation.profilePicture is not empty %}
<img src="{{ userInformation.profilePicture }}" />
{% endif %}
它說PathUserResponse沒有profilePicture方法。我的猜測是我不應該使用PathUserResponse,但我不知道我做錯了什麼。有人能指引我朝着正確的方向嗎?