如果用户尝试在OAuth窗口中登录,则Instagram API(经典,而非图形)会丢失重定向URL中的自定义参数.
由于丢失重定向URI中的自定义参数,Instagram获取访问令牌返回"重定向URI不匹配错误"
来自Instagram的回复:
{'error_code'=>90001, 'error_message'=>'POST https://api.instagram.com/oauth/access_token/: 400: OAuthException: Redirect URI doesn't match original redirect URI'}
Run Code Online (Sandbox Code Playgroud)
如果用户在执行OAuth之前登录Instagram,一切正常.
我有一个linkedin公司页面.我试图通过Linkedin Rest API发布对该页面已经存在的帖子的评论.以下是请求详细信息:
HTTP方法:POST
网址:https://api.linkedin.com/v2/socialActions/urn:li:activity:{activity-id}/comments
标题:授权,内容类型
身体 :
{"actor": "urn:li:organizationBrand:<org id>",
"message": {
"attributes": [],
"text": "This is a comment"
}}
Run Code Online (Sandbox Code Playgroud)
上面的请求给我发了以下错误:
{"message": "com.linkedin.restli.client.RestLiResponseException: Response status 500, serviceErrorMessage: Error creating comment",
"status": 500}
Run Code Online (Sandbox Code Playgroud)
同样的请求适用于另一个linkedin公司页面.能帮我找到问题所在吗?
如何使用 JavaPoet 生成以下枚举类?
public enum Planet {
MERCURY (3, 2),
VENUS (4, 6)
}
Run Code Online (Sandbox Code Playgroud)