Since a website no longer provides the basicauth Method for logon from January 1, September 1, oauth is required, which makes it inconvenient for Chinese netizens. Because many third parties only support basicauth.
As a last resort, you can only get a twip to switch to the API.
The twip document is really too much, so the installation process mainly refer to this Article "easily build oauth twip (PHP)
", But I don't know whether it is a version issue or another reason. After installing the plug, I came to timeline and checked it for half a day. It turned out to be a small problem.
The main installation process is not nonsense. Just read the link above. The following mainly describes some precautions.
Note: Take twip 3.1.2 as an example.
First, when registering a Twitter application, the callback URL should be fully written, similar to: https: // yourdomain/twip/callback. php
The second is to note that the oauth directory must have the write permission of the webserver user (the simplest is to set it to 777, but this may not be safe enough), but the directory cannot be accessed through the web, that is, it cannot be attached to any domain name. As mentioned above, I would like to emphasize it here.
Third, if the twip directory is not called twip or is not a sub-directory but a sub-domain name, go to index. php to change webroot, as shown in the previous article.Article.
The fourth is the problem I encountered. A rewritebase/twip line needs to be added to htaccess. Of course, if you use a subdomain name, this should be rewritebase/
After configuration, visit the twip homepage, click sign in, and then click Allow to return to twip to set a password. This password is the basicauth password provided by twip, and does not have to be the same as your actual account password.
If you can return to the home page to display five timeline contents, it indicates that the request is successful. Otherwise, check the server log to find the cause.
For future use, you can directly use http: // yourdomain/twip where you need the API, and use your username and the password you just set on twip (note that this password should be correct) log on to basicauth.