From 3085eedcd6002de81d2d7acb89cb3e3e030f85cb Mon Sep 17 00:00:00 2001 From: fengyuexingzi Date: Tue, 12 Jun 2018 17:22:56 +0800 Subject: [PATCH] auth --- auth/linkedin/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auth/linkedin/index.php b/auth/linkedin/index.php index 33323a7..95c2fc4 100644 --- a/auth/linkedin/index.php +++ b/auth/linkedin/index.php @@ -26,8 +26,9 @@ function curl_get($url, $data) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_HTTPHEADER, [ - 'Authorization: Bearer' . $data['access_token'], + 'Authorization: ' . $data['access_token'], ]); + curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_HEADER, false);