我可以让FB_Ignited使用所提供的演示,但每当我从我的网站的登录页面尝试它时,它就会:
出于某种原因,在开始视图中,$ this-> fb_me不可用。
这是我的Auth控制器 - 当从登录页面点击FB按钮时,它会被点击
class Auth extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->library('fb_ignited');
// The fb_ignited library is already auto-loaded so call the user and app.
$this->fb_me = $this->fb_ignited->fb_get_me();
$this->fb_app = $this->fb_ignited->fb_get_app();
// This is a Request System I made to be used to work with Facebook Ignited.
// NOTE: This is not mandatory for the system to work.
if ($this->input->get('request_ids'))
{
$requests = $this->input->get('request_ids');
$this->request_result = $this->fb_ignited->fb_accept_requests($requests);
}
}
function index($type="")
{
if (isset($this->request_result)) {
$content_data['error'] = $this->request_result;
}
if ($this->fb_me) {
$content_data['me'] = $this->fb_me;
}
$this->load->model('users');
$checkandadd = $this->users->checkandadd($this->fb_me);
$this->load->view('start', $content_data);
}
}
不确定它是否有帮助,但这里是$ this-> facebook输出(ID和哈希故意调整):
Facebook Object
(
[appId:protected] => 123456123456123456
[apiSecret:protected] => 123456123456123456
[user:protected] => 0
[signedRequest:protected] =>
[state:protected] => 123456123456123456
[accessToken:protected] => 123456123456123456|123456123456123456
[fileUploadSupport:protected] =>
)
其他一些说明:
*RECURSION*
会出现几次之前有人遇到过这样的事吗?
答案 0 :(得分:0)
在最新版本的Facebook Ignited中,您会发现我已经解决了那个没有启用查询字符串以及未加载用户信息的人的问题,因为我使用的是最新的Facebook PHP SDK 。我建议您升级到v1.1.2,只需对CodeIgniter应用程序进行最少的更改即可下载。