【发布时间】:2022-11-27 02:37:00
【问题描述】:
使用 Telegram TDLIB 时,我有一个奇怪的行为。我已经为 C++ Windows 库编译了 TDLib,现在有了用于 Win32 和 Win64 的 tdjson.dll。 我的应用程序使用的是 WIN32 版本,没有任何问题,但是当我尝试通过 setTdlibParameters 和 JSON 在 Win64 上设置 TdLib 参数时,出现以下错误:
{"@type":"error","code":400,"message":"Valid api_id must be provided. Can be obtained at https://my.telegram.org"}
我什至使用与 WIN32 版本中相同的 JSON 字符串:
{"@type":"setTdlibParameters","parameters":{"database_directory":"C:\\tdlib","use_file_database":true,"use_chat_info_database":true,"use_message_database":true,"use_secret_chats":true,"api_id":123456789,"api_hash":"5485ed51254e12547ae5555555e555d0","system_language_code":"en","device_model":"Desktop","application_version":"0.1","enable_storage_optimizer":true}}
但是,我总是遇到 WIN64 的无效 API_ID 错误。为什么相同的 JSON 请求不适用于 x64 DLL 版本?
任何帮助深表感谢。
【问题讨论】:
标签: json 64-bit telegram tdlib