delphi - How can I save a WhatsApp session using Delphi and Chromium?
问题描述
I'm using the CEF3 2378.1280 branch and Delphi 10.1. I'm using the following code to save sessions:
var
CookieManager: ICefCookieManager;
FromCreate:
CookiesPath := ExtractFilePath(Application.ExeName) + 'cookies';
CookieManager := TCefCookieManagerRef.Global(nil);
CookieManager.SetStoragePath(CookiesPath, true, nil);
This code work fine with Facebook and a lot of other sites. But for web.whatsapp.com it can't save the session: After restarting the program, I must do tge QR-code validation again.
How can I save a WhatsApp session?
解决方案
很抱歉我让你把你的问题移到这里。通常,所有可能与 CEF 绑定有关的问题都被重定向到各自的论坛,这是一个纯 DCEF3 问题。
您不需要指定单独的 cookies 目录。您只需要使用“ CefCache ”变量设置缓存目录。
CEF3 2378.1280 分支太旧,该网站可能不支持它。如果您仍然需要支持 Windows XP 和 Vista,请升级到 CEF3.2623,如果您想要最新的分支,请升级到 CEF3.3440。
如果您决定使用 CEF3.2623 您可以使用DCEF3或OldCEF4Delphi。要使用最新的分支,您必须使用CEF4Delphi。
推荐阅读
- java - 如何打印字符串数组列表?
- r - geom_line 上方 geom_segment 的类似热图的图例
- xml - 在Powershell中编辑具有相同节点名称的不同xml节点
- gatsby - Gatsby 页面组件作为类组件
- java - 是什么原因导致 ”
使用 Luke 在 Lucene 中没有位置数据的索引”错误? - sql - ColdFusion - 需要遍历文件夹以从 SQL 查询中查找特定文件并将它们复制或压缩到临时文件夹
- php - 使用 CakePHP 3.7 测试路由中间件
- hyperledger-fabric - Hyperledger Fabric - 新的 MSP 隶属关系错误 - 访问被拒绝:频道 [] creator org []
- java - DocumentBuilderFactory 无法设置功能 FEATURE_SECURE_PROCESSING
- javascript - 从选项下拉存储状态以将其传递给父组件