我正在研究facebook api。我想获得用户的所有facebook帖子。我在代码中设置了app_id,secret和permission。
此代码完全适用于我的localhost。但是当我把它放在服务器上时,那么在验证期间就会出错:
此网页有重定向循环
我的代码位于网址:https://github.com/ucerturohti/facebookapitest.git
,该应用位于https://statusupdates.herokuapp.com
更新
当我将重定向网址“https://statusupdates.herokuapp.com”然后进行身份验证时。
但是当我将重定向网址设为“https://statusupdates.herokuapp.com/getlike.php”时,它就会出错。
更新2
当我试图回显$ user的值时,它总是给出0
答案 0 :(得分:0)
不要将header()放在构造函数中...... 当您实例化facebookAllInOne类
时,它将始终发送到登录页面