我无法从 Linkedin API 获得 JSON return
I am stuck getting a JSON return from the Linkedin API
我正在使用 RESTFUL API 请求。这是我的代码:
$(document).ready(function(){
var LinkedinAuth = "https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=75rsv9vpa1ixv3&redirect_uri=https%3A%2F%2Fmattobra.github.io/page.html&state=987654321&scope=r_basicprofile"
$(button).click(function(){
LinkedinAuth
})
var start = function(){$.getJSON("https://api.linkedin.com/v1/people/~:(id,first-name,skills,educations,languages,twitter-accounts)?format=json", function(data){console.log(data)})
}
我让用户登录。然后将他们带到下一页。但是,json 永远不会返回。
我没有看到您在代码中的任何地方调用 start() 函数。你只声明它。我认为你应该把它放在按钮点击函数中。
我正在使用 RESTFUL API 请求。这是我的代码:
$(document).ready(function(){
var LinkedinAuth = "https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=75rsv9vpa1ixv3&redirect_uri=https%3A%2F%2Fmattobra.github.io/page.html&state=987654321&scope=r_basicprofile"
$(button).click(function(){
LinkedinAuth
})
var start = function(){$.getJSON("https://api.linkedin.com/v1/people/~:(id,first-name,skills,educations,languages,twitter-accounts)?format=json", function(data){console.log(data)})
}
我让用户登录。然后将他们带到下一页。但是,json 永远不会返回。
我没有看到您在代码中的任何地方调用 start() 函数。你只声明它。我认为你应该把它放在按钮点击函数中。