2016-11-23 85 views
2

我需要在電報中獲取頻道的配置文件圖片。根據此文檔: https://core.telegram.org/bots/api電報使用Bot API獲取頻道配置文件照片

我首先嚐試使用getChat獲取有關通道的基本信息。我成功了。它給了我這樣一個JSON:

{"ok":true,"result":{"id":-1001003587533,"title":"\u06a9\u0627\u0641","username":"kafiha","type":"channel"}} 

在此之後我嘗試使用「getUserProfilePhotos」,讓個人資料照片。但是我無法讓它工作,因爲當我傳遞了最後一個請求或channeld用戶名(@channelName)的ID時,它會響應錯誤。

你知道我該如何使用Bot API for Telegram完成這項工作?

回答

1

它現在在Bot API中不可用。 getUserProfilePhotos方法需要user_id參數,而不是chat_id當您嘗試。