The principle is the same as sharing to other programs. Intents must be used to pass data to other programs.
Intent i = new Intent(Intent.ACTION_VIEW); //Declare to open another VIEW.
String guanzhu_URL = "http://weixin.qq.com/r/o3W_sRvEMSVOhwrSnyCH";
//This is the actual content of the QR code of your public account. You can scan it with scanning software and get it. This is my public account address.
i.setData(Uri.parse(guanzhu_URL));
//Set the content to be passed.
i.setPackage("com.tencent.mm");
//Directly specify the package name of the program to be sent. It doesn’t need to be formulated. A program selector will pop up allowing you to manually select a program.
Look up the Android API documentation carefully. It was found that there is no such open API interface.
The first thing I understand is that you can jump to your public account page by clicking on the link. Then the user clicks to follow. I don't know if this is the right way to describe the problem. I think this is illegal. Because WeChat emphasizes users. Therefore, such a jump is actually an illegal behavior. So WeChat will not provide such a function. However, WeChat provides SendMessageToWX, a third-party application that actively initiates message sharing requests to WeChat. method
The principle is the same as sharing to other programs. Intents must be used to pass data to other programs. Intent i = new Intent(Intent.ACTION_VIEW); //Declare to open another VIEW.
String guanzhu_URL = "http://weixin.qq.com/r/o3W_sRvEMSVOhwrSnyCH"; //This is the actual content of the QR code of your public account. You can scan it with scanning software and get it. This is my public account address.
i.setData(Uri.parse(guanzhu_URL)); //Set the content to be passed.
i.setPackage("com.tencent.mm"); //Directly specify the package name of the program to be sent. It doesn’t need to be formulated. A program selector will pop up allowing you to manually select a program.
i.putExtra(Intent.EXTRASUBJECT,"Share"); i.setFlags(Intent.FLAGACTIVITYNEWTASK);
startActivity(intent); //Of course it must be called on the Activity interface.
Look up the Android API documentation carefully. It was found that there is no such open API interface. The first thing I understand is that you can jump to your public account page by clicking on the link. Then the user clicks to follow. I don't know if this is the right way to describe the problem. I think this is illegal. Because WeChat emphasizes users. Therefore, such a jump is actually an illegal behavior. So WeChat will not provide such a function. However, WeChat provides SendMessageToWX, a third-party application that actively initiates message sharing requests to WeChat. method
Now there is a way, dunkou: Yaoyao four zero zero four Yaoyao