# 3 Twitter Cookie-JSON登录

{% hint style="danger" %} <mark style="background-color:red;">**注意Cookie-JSON会随着Twitter账号密码改变而改变，使用账号密码登录后Cookie-JSON也会改变，使用Cookie-JSON登录并将账号手动进行登出也会导致Cookie-JSON改变**</mark>
{% endhint %}

{% hint style="danger" %} <mark style="background-color:red;">**如果使用Cookie-JSON登录不成功，需要使用账号密码进行登录，需获取Cookie-JSON可使用插件的导出功能**</mark>
{% endhint %}

## [<mark style="background-color:green;">**Cookie-JSON登录视频教程（点击跳转）**</mark>](https://youtu.be/9GBaEKTaAQ0)

### **账号格式说明：**

{% tabs %}
{% tab title="双验账号" %}

* 推特用户名----推特密码----手机号----邮箱----邮箱密码----注册日期----<mark style="background-color:red;">**Cookie-JSON**</mark>
* @123456----123456----86 12345678912----123456\@1234.com----123456----2055/05/05----<mark style="background-color:red;">**\[{"domain": "twitter.com","hostOnly": false,"httpOnly": true,"name": "\_twitter\_sess","path": "/","sameSite": "unspecified","secure": true,"session": true,"storeId": "0","value": \~\~\~\~\~\~此处省略\~\~\~\~\~{"domain": "twitter.com","hostOnly": true,"httpOnly": false,"name": "lang","path": "/","sameSite": "unspecified","secure": false,"session": true,"storeId": "0","value": "en","id": 1}]**</mark>
* <mark style="background-color:red;">**那么这个账号的Cookie-JSON为：\[{"domain": "twitter.com","hostOnly": false,"httpOnly": true,"name": "\_twitter\_sess","path": "/","sameSite": "unspecified","secure": true,"session": true,"storeId": "0","value": \~\~\~\~\~\~此处省略\~\~\~\~\~{"domain": "twitter.com","hostOnly": true,"httpOnly": false,"name": "lang","path": "/","sameSite": "unspecified","secure": false,"session": true,"storeId": "0","value": "en","id": 1}]**</mark>
  {% endtab %}

{% tab title="手机验证账号" %}

* 推特用户名----推特密码----手机号----注册日期----<mark style="background-color:red;">**Cookie-JSON**</mark>
* @123456----123456----86 12345678912----2055/05/05----<mark style="background-color:red;">**\[{"domain": "twitter.com","hostOnly": false,"httpOnly": true,"name": "\_twitter\_sess","path": "/","sameSite": "unspecified","secure": true,"session": true,"storeId": "0","value": \~\~\~\~\~\~此处省略\~\~\~\~\~{"domain": "twitter.com","hostOnly": true,"httpOnly": false,"name": "lang","path": "/","sameSite": "unspecified","secure": false,"session": true,"storeId": "0","value": "en","id": 1}]**</mark>
* <mark style="background-color:red;">**那么这个账号的Cookie-JSON为：\[{"domain": "twitter.com","hostOnly": false,"httpOnly": true,"name": "\_twitter\_sess","path": "/","sameSite": "unspecified","secure": true,"session": true,"storeId": "0","value": \~\~\~\~\~\~此处省略\~\~\~\~\~{"domain": "twitter.com","hostOnly": true,"httpOnly": false,"name": "lang","path": "/","sameSite": "unspecified","secure": false,"session": true,"storeId": "0","value": "en","id": 1}]**</mark>
  {% endtab %}

{% tab title="邮箱验证账号" %}

* 推特用户名----推特密码----邮箱----邮箱密码----注册日期----<mark style="background-color:red;">**Cookie-JSON**</mark>
* @123456----123456----123456\@1234.com----123456----2055/05/05----<mark style="background-color:red;">**\[{"domain": "twitter.com","hostOnly": false,"httpOnly": true,"name": "\_twitter\_sess","path": "/","sameSite": "unspecified","secure": true,"session": true,"storeId": "0","value": \~\~\~\~\~\~此处省略\~\~\~\~\~{"domain": "twitter.com","hostOnly": true,"httpOnly": false,"name": "lang","path": "/","sameSite": "unspecified","secure": false,"session": true,"storeId": "0","value": "en","id": 1}]**</mark>
* <mark style="background-color:red;">**那么这个账号的Cookie-JSON为：\[{"domain": "twitter.com","hostOnly": false,"httpOnly": true,"name": "\_twitter\_sess","path": "/","sameSite": "unspecified","secure": true,"session": true,"storeId": "0","value": \~\~\~\~\~\~此处省略\~\~\~\~\~{"domain": "twitter.com","hostOnly": true,"httpOnly": false,"name": "lang","path": "/","sameSite": "unspecified","secure": false,"session": true,"storeId": "0","value": "en","id": 1}]**</mark>
  {% endtab %}

{% tab title="Cookie-JSON完整实例" %}
\[{"domain": "twitter.com","hostOnly": false,"httpOnly": true,"name": "\_twitter\_sess","path": "/","sameSite": "unspecified","secure": true,"session": true,"storeId": "0","value": "BAh7CSIKZmxhc2hJQzonQWN0a456456vbGxlcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7ADoPY3JlYXRlZF9hdGwrCFQrvsWGAToMY3NyZl9p%0AZCIlMDZkMzgyZTA5ZDJmNThiYmRkOGYzNzJjODcxMWM0ZGE6B2lkIiUzMDhi%0AYTcyMjYyNjUzZjA3MzI5NGIzYTY2YTU3NjkzNw%3D%3D--fd91f510bf4eca6456456dac50cbb883aba5d2","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.976314,"hostOnly": false,"httpOnly": true,"name": "auth\_token","path": "/","sameSite": "no\_restriction","secure": true,"session": false,"storeId": "0","value": "ca4afe5f53dc1654613b59b64564366d24acdb80a","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.803196,"hostOnly": false,"httpOnly": false,"name": "personalization\_id","path": "/","sameSite": "unspecified","secure": true,"session": false,"storeId": "0","value": "v1\_opimfMSzP9t2aVtDqGOyjA==","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.803196,"hostOnly": false,"httpOnly": false,"name": "guest\_id\_marketing","path": "/","sameSite": "unspecified","secure": true,"session": false,"storeId": "0","value": "v1:167835475260591960","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.803196,"hostOnly": false,"httpOnly": false,"name": "guest\_id\_ads","path": "/","sameSite": "unspecified","secure": true,"session": false,"storeId": "0","value": "v1:167835475260591960","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.801423,"hostOnly": false,"httpOnly": false,"name": "guest\_id","path": "/","sameSite": "no\_restriction","secure": true,"session": false,"storeId": "0","value": "v1:167835475260591960","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.20651,"hostOnly": false,"httpOnly": false,"name": "ct0","path": "/","sameSite": "lax","secure": true,"session": false,"storeId": "0","value": "c0c1c0a123cfb5231cf60b6ad64564523dfff7957ae62556ae7ce120928a8ffc89dbec5c337512e4dc1521a698144cf6a00ad18bd5136724f13632bd976b960cc70c39c133e47506c0e6f6c5b65ba0","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.976211,"hostOnly": false,"httpOnly": true,"name": "kdt","path": "/","sameSite": "unspecified","secure": true,"session": false,"storeId": "0","value": "aZhaJCIisYlvDRmQFzOb7C04WasdaC3lZwM1rViJY","id": 1},{"domain": "twitter.com","expirationDate": 1836016023.750326,"hostOnly": false,"httpOnly": false,"name": "twid","path": "/","sameSite": "no\_restriction","secure": true,"session": false,"storeId": "0","value": "u=163376564995180036","id": 1},{"domain": "twitter.com","hostOnly": true,"httpOnly": false,"name": "lang","path": "/","sameSite": "unspecified","secure": false,"session": true,"storeId": "0","value": "en","id": 1}]
{% endtab %}
{% endtabs %}

### 使用Cookie-JSON**登录的两种插件：**

#### <mark style="background-color:red;">**若确定导入了但是没登录进去的话，可以用用户名和密码登录（基本不需要验证）**</mark>

{% tabs %}
{% tab title="插件：EditThisCookie" %}

### <mark style="background-color:blue;">**第一种方式：**</mark> **扩展程序(EditThisCookie）登录，Chrome浏览器扩展程序下载地址**[**https://chrome.google.com/webstore/detail/editthis**](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg)

### [**cookie/fngmhnnpilhplaeedifhccceomclgfbg**](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg)

### <mark style="background-color:purple;">**步骤一：**</mark> **下载，安装扩展程序**

<figure><img src="/files/FJ8LO6k6nCmKa6tvZgcd" alt=""><figcaption><p>安装插件</p></figcaption></figure>

### <mark style="background-color:purple;">**步骤二：**</mark><mark style="background-color:red;">**打开Twitter以下页面的其中一个：两个页面操作一致，本教程使用主页进行演示（其他页面使用请自行测试！）**</mark>

### <mark style="background-color:red;">**Twitter主页**</mark>  [<mark style="background-color:red;">**https://twitter.com**</mark>](https://twitter.com/)

### <mark style="background-color:red;">**Twitter登录页面**</mark>  [<mark style="background-color:red;">**https://twitter.com/i/flow/login**</mark>](https://twitter.com/i/flow/login)

### **打开页面，并清空Cookie**

<div><figure><img src="/files/oTdirvzqQhTeRrMOHnjC" alt=""><figcaption><p>打开网站，并清空Cookie</p></figcaption></figure> <figure><img src="/files/BbeGnfPL1V4uUoTVAOt9" alt=""><figcaption><p>打开网站，并清空Cookie</p></figcaption></figure> <figure><img src="/files/cFjOFuDP8CcLB9ByZqcD" alt=""><figcaption><p>打开网站，并清空Cookie</p></figcaption></figure></div>

### <mark style="background-color:purple;">**步骤三：**</mark><mark style="background-color:red;">**清空Cookie后，点击导入按钮；复制Cookie-JSON到内容框中，点击绿色√完成添加**</mark>

<figure><img src="/files/2V8HWjI8OQWZiJ4yZfjW" alt=""><figcaption><p>点击导入按钮</p></figcaption></figure>

<figure><img src="/files/MpIfhjt2huPciZB8yfaT" alt=""><figcaption><p>复制 Cookie-JSON到内容框中，点击绿色完成添加</p></figcaption></figure>

### <mark style="background-color:purple;">**步骤四：**</mark><mark style="background-color:red;">**点击刷新（按F5），刷新网页即可完成使用Token登录Twitter；**</mark>

### <mark style="background-color:red;">若刷新之后未登录，且确定Cookie已导入， 那么可使用用户名和密码登录（不要求验证）。</mark>

<figure><img src="/files/AcULMQqGaEuhFCdS6Yfy" alt=""><figcaption><p>刷新页面完成登录</p></figcaption></figure>
{% endtab %}

{% tab title="插件：Cookie-Editor" %}

### <mark style="background-color:blue;">**第一种方式：**</mark> **扩展程序(Cookie-Editor）登录，Chrome浏览器扩展程序下载地址**[**https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm**](https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm)

### <mark style="background-color:purple;">**步骤一：**</mark> **下载，安装扩展程序**

<figure><img src="/files/VrwzNJIHwLJpICMIfbeV" alt=""><figcaption><p>安装插件</p></figcaption></figure>

### <mark style="background-color:purple;">**步骤二：**</mark><mark style="background-color:red;">**打开Twitter以下页面的其中一个：两个页面操作一致，本教程使用登录页面进行演示（其他页面使用请自行测试！）**</mark>

### <mark style="background-color:red;">**Twitter主页**</mark>  [<mark style="background-color:red;">**https://twitter.com**</mark>](https://twitter.com/)

### <mark style="background-color:red;">**Twitter登录页面**</mark>  [<mark style="background-color:red;">**https://twitter.com/i/flow/login**</mark>](https://twitter.com/i/flow/login)

### <mark style="background-color:red;">**打开页面，并清空Cookie**</mark>

<div><figure><img src="/files/y34Khxqf2oiUMQqWZ5aE" alt=""><figcaption><p>打开网站，并清空Cookie</p></figcaption></figure> <figure><img src="/files/hSzgGLGAvltsSAUXOGwR" alt=""><figcaption><p>打开网站，并清空Cookie</p></figcaption></figure> <figure><img src="/files/HBTrEASb2ejbBxNbgiD4" alt=""><figcaption><p>打开网站，并清空Cookie</p></figcaption></figure></div>

### <mark style="background-color:purple;">**步骤三：**</mark><mark style="background-color:red;">**清空Cookie后，点击导入按钮；复制Cookie-JSON到内容框中，点击导入完成添加**</mark>

<figure><img src="/files/I6GqjqursUf0M9qDi7Ae" alt=""><figcaption><p>点击导入按钮</p></figcaption></figure>

<figure><img src="/files/OHbWlW114WhYmfgnjOPe" alt=""><figcaption><p>复制 Cookie-JSON到内容框中，点击保存完成添加</p></figcaption></figure>

### <mark style="background-color:purple;">**步骤四：**</mark><mark style="background-color:red;">**点击刷新（按F5），刷新网页即可完成使用Token登录Twitter；**</mark>

### <mark style="background-color:red;">若刷新之后未登录，且确定Cookie已导入， 那么可使用用户名和密码登录（不要求验证）。</mark>

<figure><img src="/files/NJWsq15hNLT7lyNUjbnr" alt=""><figcaption><p>刷新页面完成登录</p></figcaption></figure>
{% endtab %}
{% endtabs %}

{% hint style="danger" %}

### <mark style="background-color:red;">**如果没反应，请清空浏览器再次尝试，若还是没反应，那么可能是Cookie-JSON已经失效了，请使用账号密码进行登录（严禁使用手机号登录，不建议使用邮箱号登录）**</mark>

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://disyaoqing66.gitbook.io/acc/twitter-zhang-hao-xiang-guan/3-twitter-cookiejson-deng-lu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
