iOS:如何保存、从 foursquare 获取访问令牌
如何从可可中的 foursquare 请求中获取访问令牌?我正在访问此身份验证以从 foursquare 获取令牌:
https://foursquare.com /oauth2/authenticate?client_id=XXXXXXXXXXXXXX&response_type=token
这有效吗?
但是返回此 JSON 响应:{"error":"redirect_uri_mismatch"}
以及如何保存并获取来自这里的令牌? 大家有什么建议吗?
How can I get the access token from a foursquare request in cocoa? I am accessing this authentication to get the token from foursquare:
https://foursquare.com/oauth2/authenticate?client_id=XXXXXXXXXXXXXX&response_type=token
is this valid?
I had also tried this:
https://foursquare.com/oauth2/access_token?client_id=XXXXXXXXXXXXXX&client_secret=XXXXXXXXXXXXXX&grant_type=authorization_code&redirect_uri=http%3A%2F%2Flocalhost%2F&code=CODE
but returns this JSON response: {"error":"redirect_uri_mismatch"}
and how can I save and get the token from here?
any suggestion guys?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看https://developer.foursquare.com/resources/client,了解面向移动开发者的各种资源,包括一些用于进行 foursquare 授权的示例代码的链接: https://github.com/anoopr/core-data-talk/blob/master/example/Classes/FoursquareAuthViewController.m
Check out https://developer.foursquare.com/resources/client for various resources for mobile developers, including a link to some sample code for doing foursquare authorization: https://github.com/anoopr/core-data-talk/blob/master/example/Classes/FoursquareAuthViewController.m