我想在我的网站上使用 facebook 页面提要,但我需要一个访问权限
public function newsFacebookAction() {
require './application/libraries/facebook-php-sdk/src/facebook.php';
$facebook = new Facebook( array('appId' => FACEBOOK_KEY, 'secret' => FACEBOOK_SECRET, ));
// Get User ID
$user = $facebook -> getUser();
$args['var']['user'] = $user;
if ($user) {
$args['var']['url'] = $facebook -> getLogoutUrl();
// Get the current access token
$access_token = $facebook -> getAccessToken();
//get feed
$helper = new Helper();
$args['var']['feed'] = $helper->get_web_page("https://graph.facebook.com/OfficielAssas.net/feed?access_token=".$access_token);
} else {
$args['var']['url'] = $facebook -> getLoginUrl();
}
}
get_web_page 就是这个函数
http://nadeausoftware.com/articles/2007/06/php_tip_how_get_web_page_using_curl
我有错误:
SSL证书问题,验证CA证书是否OK。详细信息:错误:14090086:SSL 例程:SSL3_GET_SERVER_CERTIFICATE:证书验证失败
bur,如果我直接去地址,这很好用
谢谢