【问题标题】:Linkedin api oauth2.0 get user profile detailsLinkedin api oauth2.0 获取用户资料详情
【发布时间】:2015-07-26 06:22:23
【问题描述】:

根据linkedin 的新oauth 2.0。 我无法获取用户个人资料详细信息。 我已经在我的应用程序中设置了属性,但仍然无法获取详细信息。

谁能帮我用代码 sn-p 来获取用户详细信息。

    public function fetch($method, $resource, $body = '') {
    $opts = array(
        'http' => array(
            'method' => $method,
            'header' => "Authorization: Bearer " . 
            $_SESSION['oauth_access_token'] . "\r\n" . 
            "x-li-format: json\r\n"
        )
    );

    $url = 'api.linkedin.com' . $resource;
    if (count($this->$params)) {
        $url .= '?' . http_build_query($this->$params);
    }
    $context = stream_context_create($opts);
    $response = file_get_contents($url, false, $context);
    return json_decode($response);
}


$xml_response = $LinkedInn->fetch("GET","/v1/people/~");

【问题讨论】:

  • 您的回复是什么?
  • 空白回复....什么都没有

标签: php api oauth-2.0 linkedin linkedin-api


【解决方案1】:

当您使用链接登录时,请检查您在代码中的权限。 看看这个链接-

https://developer.linkedin.com/support/developer-program-transition

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-07-08
    • 1970-01-01
    • 1970-01-01
    • 2018-01-27
    • 1970-01-01
    • 2019-04-20
    • 1970-01-01
    • 2017-09-01
    相关资源
    最近更新 更多