如何从iframe应用程序中获取用户细节?
the problem is when i try to authenticate the user it authenticating and redirecting to the SITE
not to facebook .
事实上,如果像需要利用图表复制件(任何其他方式/javascript )获取用户细节,则使用已签名的“要求”检查用户喜欢或不喜欢。 这样,就可以在数据库中节省费用。
This is my current code
if (isset($_REQUEST[ signed_request ]))
{
$encoded_sig = null;
$payload = null;
list($encoded_sig, $payload) = explode( . , $_REQUEST[ signed_request ], 2);
$sig = base64_decode(strtr($encoded_sig, -_ , +/ ));
$data = json_decode(base64_decode(strtr($payload, -_ , +/ ), true));
if($data->page->liked)
{
//liked
$questions = $this->functions->get_questions();
if($questions["status"] ==TRUE)
{
$questions["data"] = $questions["data"]->result_array();
$this->load->view("public/contest",$questions);
}
else
{
echo "FALSE";
}
}
else {
//not liked
$this->load->view("public/continue");
}
}
谢谢。