Saltad

Saltad

Tutorial: Real-time Backup of WeChat Official Accounts Using Blockchain

If you still have doubts before starting to read this tutorial, "Why should I back up my WeChat public account on the Crossbell chain," then don't miss this article.

This tutorial will be divided into two parts. The first part will briefly introduce the basic steps to implement real-time backup, ignoring the details. The second part will guide you step by step on how to back up your WeChat public account in real-time using the Crossbell chain.

Basic Idea#

Browser scripts can help us listen to users' clicks to publish WeChat public account articles on the front end. This means we can try to construct a script like this: when detecting the user's click operation, capture the content of the article on the page, and then upload the content to the chain to achieve real-time backup.

Of course, before uploading to the chain, you also need to prepare a wallet address with $CSB (used to pay for subsequent article chaining operations). This address will have the articles synchronized to the chain.

Note: This tutorial only involves synchronizing the content to the chain when a new article is published. The solution for synchronizing historical articles is under development.

Detailed Introduction#

If you prefer video tutorials, we have also prepared a video tutorial:

Preparations#

  1. Use a compatible browser and prepare a new address.
    • Please choose Firefox or Chrome.
    • You can use the Metamask wallet to create a new address. As mentioned earlier, your articles will be published and synchronized under this address.
  2. Claim some $CSB from the faucet for the address you just created.
    • As mentioned earlier, this is used to pay for subsequent article chaining operations.
    • The $CSB you receive once is enough to synchronize approximately 100 pieces of content. If you have more needs later, you can go to the faucet to claim more.
  3. Install a script manager plugin.
    • ViolentMonkey or TamperMonkey

Install the Script#

With the preparations mentioned above completed, now we can proceed to install the script.

  1. Install the script from the Github link.
    • After clicking the link above, the script manager is expected to automatically prompt you to install the script. Follow the plugin prompts to install the script.
  2. Go to the plugin's management panel and select Edit for the script you just installed. Replace 0xPUT_YOUR_PRIVATE_KEY_HERE with the private key of the wallet address prepared earlier. (If using ViolentMonkey, click reinstall)
  3. Finally, make sure the script is in the Enabled state in the management panel.

Getting Started#

If all the configurations above are successful, now open the article editing page of your WeChat public account, and you will see the following interface:
1-Getting Started

  • ViolentMonkey script has a prompt for detecting the script.
  • Links are embedded in the body of the article.
  • The text of the mass send button changes from "Mass Send" to "Backup and Mass Send."

If you encounter the following errors:

  1. Improper private key settings
    Screen Shot 2022-12-21 at 9.08.44 PM

Please refer to the second step of installing the script.

  1. Insufficient $CSB
    Screen Shot 2022-12-21 at 9.09.52 PM

Please refer to the second step of the preparations.


If you have any questions about the above steps, please feel free to discuss on Github or contact [email protected].

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.