【问题标题】:How to list Google Merchant Center Feeds如何列出 Google Merchant Center Feed
【发布时间】:2014-09-09 17:52:02
【问题描述】:

我正在尝试通过 Google API 读取客户的供稿。我得到了一个访问令牌。

这是我遵循的文档:https://developers.google.com/shopping-content/developers-guide-python#authentication

此处的示例显示了要使用的 ACCOUNT_ID,但我不明白从哪里接收此信息。

import gdata.contentforshopping.client
ACCOUNT_ID = '1234567'
shopping_client = gdata.contentforshopping.client.ContentForShoppingClient(account_id=ACCOUNT_ID)

这是我到目前为止所做的:

import gdata.contentforshopping.client
import gdata.gauth

part = 2

auth_token = gdata.gauth.OAuth2Token(client_id=CLIENT_ID, client_secret=CLIENT_SECRET, scope=SCOPE, user_agent=USER_AGENT)
shopping_client = gdata.contentforshopping.client.ContentForShoppingClient()
authorize_url = auth_token.generate_authorize_url(redirect_uri=APPLICATION_REDIRECT_URI)

if part == 1:
    print 'Please visit: %s' % authorize_url

elif part == 2:

    query = {'code': 'xxxx'} # received from result of part == 1
    auth_token.get_access_token(query)
    auth_token.authorize(shopping_client)
    accounts = shopping_client.GetClientAccounts()
    print(accounts)

【问题讨论】:

    标签: python api google-api google-api-python-client


    【解决方案1】:

    事实证明,没有合适的方法来做到这一点。您必须从旧 API 中获取错误并对其进行解析以找出您的商家 ID。

    来源:https://groups.google.com/forum/#!topic/google-content-api-for-shopping/3iLEm9puJis

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-06-07
      • 1970-01-01
      • 2016-01-15
      • 2014-08-25
      • 1970-01-01
      • 1970-01-01
      • 2015-02-06
      相关资源
      最近更新 更多