【问题标题】:Using Tweepy with Apigee将 Tweepy 与 Apigee 一起使用
【发布时间】:2011-05-21 23:30:51
【问题描述】:

我正在使用 Tweepy,但我正在尝试将它与来自 apigee 的 api 一起使用,但这样做需要我更改 auth.py https://github.com/joshthecoder/tweepy/blob/master/tweepy/auth.py 它看起来像并以某种方式重新制作包。反正有没有将 tweepy 与另一个 api 一起使用?或者另一种方法来设置 Python 以使用 OAuth,但使用连接到 Twitter 的 apigee api。

谢谢,

【问题讨论】:

    标签: python twitter twitter-oauth tweepy apigee


    【解决方案1】:

    短版:需要像访问 Twitter 一样对请求进行签名,然后通过 Apigee 路由它们(即代理用例)。

    较长的回复与此处的链接: http://support.apigee.com/apigee/topics/using_python_and_apigees_twitter_api_with_oauth

    【讨论】:

    • 我运行 Twitter 三足 OAuth 示例;其中consumer_key 和consumer_secret 是我的APP 授权它并输入PIN 号码然后查看它是否在我添加的程序结束时工作:request_token_url = "http://api-user.apigee.com/1/statuses..." resp, content = client.request(request_token_url, "GET", PROXY_DOMAIN) print resp print content 但它仍然使用非OAuth 登录。谢谢,跨度>
    • 我能够使用 Twitter 三足 OAuth 示例使其正常工作。或者,可以使用 tweepy 模块来执行 OAuth 部分。
    猜你喜欢
    • 2014-04-23
    • 2014-10-24
    • 1970-01-01
    • 1970-01-01
    • 2014-09-16
    • 2021-06-18
    • 1970-01-01
    • 2019-12-14
    • 1970-01-01
    相关资源
    最近更新 更多