0

我正在使用 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 交互,但无需离开我的网站......

我怎样才能做到这一点?是否可以?

谢谢!

4

1 回答 1

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);
}

我希望它可以帮助将来的人!

于 2013-01-17T07:17:59.530 回答