向 twitter 的 oauth/authorize 发送额外参数 [英] Sending extra parameters to twitter's oauth/authorize
问题描述
我想将一些额外的参数发送到 twitter 的 oauth/authorize 端点(连同 oauth_token
)并在回调请求中将它们取回(连同 oauth_token
)和 oauth_verifier
).例如:
I want to send some extra parameters to twitter's oauth/authorize endpoint (along withoauth_token
) and get them back as it is in the callback request (along with oauth_token
and oauth_verifier
).
For example:
请求(额外参数 - app_name
):
request(extra parameter - app_name
):
https://api.twitter.com/oauth/authorize?oauth_token=FxHxpek2NRJWJK3Vi/a>&app_name=myTwitterApp
回调请求应该是(返回的额外参数 - app_name
):
callback request should be(extra parameter returned as it is - app_name
):
http://www.example.com?oauth_token=FxHxpekZK8VVfNRr38i2WKJskIZY3Hj7&oauth_verifier=Vq0yq2LRUBybevnjGvXyUOBPWH9Ew9DY &app_name=myTwitterApp
请告诉我这在 Twitter 上是否可行,就像在 Google 和 Facebook 上一样.
Please let me know if this doable in twitter as it is in Google and Facebook.
推荐答案
在 twittercommunity 上提出这个问题并得到了答案.诀窍是在获取请求令牌的同时在回调 url 本身中添加额外的参数.
Asked this question on twittercommunity and got the answer. The trick was to add the extra parameters in the callback url itself while obtaining the request token.
这篇关于向 twitter 的 oauth/authorize 发送额外参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!