1

Google Mirror API で遊んでいますが、カードを特定のユーザーにのみプッシュする方法を見つけるのに苦労しています。

次の Python コードを使用してカードを投稿しようとすると、ユーザー ID ( 12345677 ) が与えられます。

 timeline_item = {'text': 'Test10'}
 timeline_item['recipients'] = [{'id':'12345677'}]
 self.mirror_service.timeline().insert(body=timeline_item).execute()

カードは、他のすべてのテスト ユーザーのタイムラインに表示されます。

私は何を間違っていますか?

4

2 に答える 2

0

The recipients field doesn't specify who a timeline item should be sent to. It contains information about who has been sent the information on the card - it is intended for use by the REPLY_ALL card to be able to handle replies that should be sent to multiple people (not necessarily using Glass).

It isn't clear what language you're using, but it sounds like you are sending the item to all the authenticated users of your service.

Typically, you will specify the OAuth Token of a particular user to write to their timeline.

于 2013-07-24T14:00:40.580 に答える