【问题标题】:Getting two user access_token from Linkedin从 Linkedin 获取两个用户 access_token
【发布时间】:2017-10-29 02:36:38
【问题描述】:

我正在使用linkedin 进程登录。

我很惊讶linkedin 会返回两个access_tokensaccess_token_secretes

第一个access_tokensession中返回为

Array
(
    [OAUTH_ACCESS_TOKEN] => Array
        (
            [https://api.linkedin.com/uas/oauth/accessToken] => Array
                (
                    [value] => some_access_token_string
                    [secret] => access_token_secrete
                    [authorized] => 
                )

        )

)

还有在

$client = new oauth_client_class;

类对象$client,认证后linkedin返回

  ["access_token"]=> "some_other_access_token"
  ["access_token_secret"]=> "some_other_access_token_secrete"
  ["access_token_expiry"]=> "2017-09-13 06:36:10"
  ["access_token_type"]=> ""
  ["default_access_token_type"]=> ""
  ["access_token_parameter"]=> ""
  ["access_token_response"]=> NULL
  ["store_access_token_response"]=> false
  ["access_token_authentication"]=> ""
  ["refresh_token"]=> ""

现在我很困惑应该将哪个 access_tokenaccess_token_secrete 值存储在数据库中以备将来使用?

【问题讨论】:

标签: php linkedin linkedin-api


【解决方案1】:

使用 ["access_token"]=> "some_other_access_token" 这将满足您的需求。

但您可以在此处阅读完整的文档:https://developer.linkedin.com/docs/best-practices#keysecret

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-11-04
    • 2016-08-22
    • 1970-01-01
    • 2016-12-16
    • 2013-07-11
    • 1970-01-01
    • 2015-08-10
    相关资源
    最近更新 更多