我正在使用FB API和FQL来获取已识别用户的一些事件代码。
但我想展示Facebook活动页面,但我找不到办法......
这是一个例子:
I go to mywebsite.com, and I login into Facebook.
I get a list of all my current events, with a Link
If I follow this link, I get the event ID (1234567, for example)
[this step is the one I want to do]:
I show in my website (like if it was an iframe) the following FB page:
https://www.facebook.com/events/1234567
所以,我希望允许用户直接与Facebook交互,但不要离开我的网站......
我该怎么做?有可能吗?
谢谢!
答案 0 :(得分:0)
解决!
function viewFBActivity($id){
$h = curl_init("https://www.facebook.com/events/".$id."/");
curl_setopt($h, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($h, CURLOPT_HEADER, false);
curl_setopt($h, CURLOPT_HTTPHEADER, array("Accept-Language: es-es,en"));
curl_setopt($h, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($h, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($h, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($h, CURLOPT_RETURNTRANSFER, true);
curl_setopt($h, CURLOPT_AUTOREFERER, true);
$ret= curl_exec($h);
echo($ret);
}
我希望将来帮助某人!