0
我想在Facebook上我的網站頁面飼料,但我需要爲獲取Facebook的飼料與Facebook API
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訪問tosken是這個函數
http://nadeausoftware.com/articles/2007/06/php_tip_how_get_web_page_using_curl
我有錯誤:
SSL證書問題,請驗證CA證書是否正常。詳細信息:錯誤:14090086:SSL例程:SSL3_GET_SERVER_CERTIFICATE:證書驗證失敗
鑽,如果我derectly去的地址能正常工作
感謝
謝謝,我更喜歡你的解決方案:) – Ajouve