【问题标题】:instagram.bind.InstagramAPIError with Instagram real time API subscriptionsInstagram 实时 API 订阅的 instagram.bind.InstagramAPIError
【发布时间】:2013-12-08 06:37:18
【问题描述】:
import uuid                                                           
import traceback                                                      
from instagram.client import InstagramAPI                             

api = InstagramAPI(                                                   
    client_id     = 'YYYYYYYY',        
    client_secret = 'XXXXXXXX',    
)                                                                     

verify_token = uuid.uuid4().hex                                       

api.create_subscription(                                              
    object       = 'tag',                                             
    object_id    = 'lol',                                             
    aspect       = 'media',                                           
    verify_token = verify_token,                                      
    callback_url = 'http://www.callback_handlers_proxy.com/instagram/consumer'
)

引发 InstagramAPIError(status_code, content_obj['meta']['error_type'], content_obj['meta']['error_message']) instagram.bind.InstagramAPIError: (400) APISubscriptionError-无效响应

我的代码有什么问题?

【问题讨论】:

    标签: python instagram


    【解决方案1】:

    Instagram 向您的回调 url 发送一个 GET 请求,该请求需要使用 hub.challenge 参数进行响应,如果您使用的是 PHP,它会在实际的 GET 流中转换为 hub_challenge(我花了很长时间才明白这一点一出)。

    您可以在此处阅读其他人讨论该问题的信息:https://groups.google.com/forum/#!topic/instagram-api-developers/p3g3gHc890s

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-21
      • 1970-01-01
      • 1970-01-01
      • 2016-12-02
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多