Facebook authentication in function - getUser() returns 0

前端 未结 5 993
余生分开走
余生分开走 2021-01-18 18:33

I\'m trying to make a function in my controller to post an album to Facebook. Every time the function is accessed, I\'m redirected to REDIRECT_URI, as if the $userid=0, eve

5条回答
  •  情歌与酒
    2021-01-18 19:12

    I was having the exact same problem on my Facebook app, and I finally figured it out after 2 days of hair pulling frustration. It turned out to be an issue with the redirect-uri in the getLoginUrl()! if it doesn't match the registered app domain through facebook, they return the error, and the user gets returned as 0 (the default user value)

提交回复
热议问题