-1
현재 PHP (Codeigniter)로 스크립트를 실행 한 후 내 페이스 북 페이지에 URL/상태를 게시하려고합니다. 현재 다음과 같은 오류가 발생했습니다 uncaught oauthexception invalid oauth access token signature.
문제는 내 액세스 토큰이 잘못되었지만 Facebook에서 읽은 문서가 아무리 많아도 알 수없는 사실을 알고 있습니다. 누군가가 내게 액세스 토큰을 얻는 방법에 대한 해결책을 줄 수 있습니까?Facebook 액세스 토큰을 가져올 수 없습니까?
include('system/libraries/facebook.php');
if($this->session->userdata('level') == "admin"){
$role = $this->input->post('role');
$company = $this->input->post('company');
$location = str_replace('+', ' ', $this->input->post('location'));
$category = str_replace('+', ' ', $this->input->post('category'));
$type = str_replace('+', ' ', $this->input->post('type'));
$description = $this->input->post('description');
$extract = $this->input->post('extract');
$date = time();
$link = $this->input->post('link');
if($this->input->post('closing_date')){
$closing_date = $this->input->post('closing_date');
$closing_date = str_replace('/', '-', $closing_date);
$closing_date = strtotime($closing_date);
}else{
$closing_date = time() + 2592000;
}
$url = str_replace(' ', '-', trim($role));
$location_dash = str_replace(' ', '-', trim($location));
$url = $url."-in-".$location_dash;
$this->db->set('role', $role);
$this->db->set('company', $company);
$this->db->set('type', $type);
$this->db->set('location', $location);
$this->db->set('category', $category);
$this->db->set('url', strtolower($url));
$this->db->set('description', $description);
$this->db->set('extract', $extract);
$this->db->set('link', $link);
$this->db->set('time', $date);
$this->db->set('closing_date', $closing_date);
$this->db->set('active', 1);
$this->db->insert('jobs');
$job = $this->db->get_where('jobs', array('time' => $date))->row_array();
$url = "http://www.example.com/job/view/".$job['id']."/".$job['url']."";
$facebook = new Facebook(array(
'appId' => '***',
'secret' => '***'
));
$message = array(
'access_token' => "***",
'message'=> "".$url.""
);
$facebook->api('/me/accounts','POST', $message);
_ "문제는 내 액세스 토큰이 잘못되었다는 것을 알고 있습니다."_ 그래서 관심없는 코드가 길면 좋을 것이라고 생각 했으므로 _except_ 그 액세스 토큰을 받고 ...? – CBroe
@CBroe 현재 https://developers.facebook.com/tools/explorer/?method=GET&path=me/accounts에서 내 access_token을 받고 있지만 올바른 액세스 코드가 있는지 확실하지 않습니다. – learn
그래프 API 탐색기에서 자신의 응용 프로그램을 사용하는 토큰 (상단의 드롭 다운에서 선택). 그렇지 않으면 GAE 응용 프로그램 용이므로 app_id/app_secret와 일치하지 않습니다. – CBroe