Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the function of automatically adding friends on Wechat by iOS

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces iOS how to achieve Wechat automatically add friends function, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor with you to understand.

(1) the effect of adding friends in batches

Xiao Cheng uses the account of "Chico" to request to add friends to everyone in a certain group. The effect of the program is as follows:

Similarly, if it is someone nearby, you can automatically send requests in batches:

It needs to be explained that this behavior of adding friends in batch is restricted by Wechat, and violators will be punished. What are the restrictions on adding people? Xiao Cheng found a saying on the Internet, and readers can learn about it:

2017 + Wechat plus restrictions: WeChat group: a maximum of 30,50 people per day, insurance is 20 people, more than the other party will not receive verification information. People nearby: 15 at a time, up to 3 times a day, with a minimum interval of x minutes; shake: 15 times a time, a maximum of 3 times a day, with a minimum interval of x minutes; search WeChat accounts: 6 times a time, a maximum of 5 times a day, the minimum interval between each time x minutes; mobile phone address book: 8 times a time, a maximum of 6 times a day, with a minimum interval of x minutes Message in a bottle: 5 times a time, up to 3 times a day, with a minimum interval of 10 minutes; actively add friends: 30 per WeChat per day; passively add a maximum of 180 friends per WeChat per day.

What will happen if it is restricted? First of all, there will be no special notice to tell you, but the request you send will not go to others (if it is in the "neighborhood", it means that you can see others and others can't see you; if you snore, others will not receive them. ), and it will take a week or more to "communicate" properly.

Therefore, the function of adding friends in batch should be used cautiously.

Xiao Cheng is only here to demonstrate "how to automate", not to add friends.

(2) how to achieve

First, track the target function.

(1) what is the interface class of the group member list?

Thus, ChatRoomInfoViewController is a goal, and its structure is as follows:

Notice the variable m_arrMemberList, which is an array of all the group members, each of which is a CContact.

(2) Click each group member

Clicking on a member calls the function-(void) openContactInfo: (id) arg1, and the member is passed in.

As you can imagine, as long as you call this function in a loop and pass in different members, you can achieve the goal of clicking on members in batches.

(3) trigger to add members

After clicking on the member, go to the "member details" page, the class of this page is like this:

If you do some guessing and tracking, you will know that when you click "add to address Book", the trigger function is

ContactInfoViewController::onSendVerifyMsg .

(4) send a request

At this point, it is time to fill in the content of greeting. A good greeting should be with the other party's nickname, which can be obtained from the member information. If the UITextField of Wechat has a length limit (some versions have a limit), you can also override the callback of the text box to remove the limit.

The class that sent the request:

(3) Summary

Xiao Cheng gives an idea of batch automation here:

Manually enter the list of group members, and then enter the automated process. When the ChatRoomInfoViewController::viewDidLoad is complete, get the m_arrMemberList, which is the list of members, and loop open each member. Use CContact::isMyContact to determine whether a member has been added, and if so, the next member. Each time you click on a member, set the state of a variable, and then wait until the state of the variable changes, and then enter the click of the next member. Click on the member to enter the "details" interface, and at the same time, UINavigationController enters and waits for several seconds (for example, 4 seconds), and then performs the return operation (regardless of whether the final addition is successful or not). Enter the verification interface, set the content of UITextField in SendVerifyMsgViewController::viewDidLoad, and then trigger the call to onSendVerifyMsg. If the verification is successful, the verification interface disappears automatically, and if it fails (there is a callback for failure), you need to actively call the successful call to make the verification interface disappear. At this time, even if there is an alertview pop-up box, it does not affect the subsequent operation. UINavigationController performs the return operation and sets the next member. ChatRoomInfoViewController executes the next member.

Thank you for reading this article carefully. I hope the article "how to automatically add friends on Wechat" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report