Author: Manuel Lemos
Viewers: 94
Last month viewers: 3
Categories: PHP Tutorials, PHP Security
What happens is that several important external sites and services are changing their APIs or introducing new rules that may break the code of your sites.
Read this article to learn about some important sites and APIs that are changing, so you can check if you need to perform urgent maintenance tasks to keep your sites working without troubles.
Introduction
We all know that the Internet is dynamic and keeps evolving to provide better services and user experience. So it is perfectly understandable that things that used work before need to change.
If those things that need to change are services provided by third parties, you may need to adapt your code to comply with the changes implemented by those services.
All that is fine, except that it seems several important services decided to choose precisely this time of the year to implement those changes.
We developers have already so much to do on our daily routine, that implementing all the modifications to comply with all these changes seems like a plot to drive us crazy.
Well, it is not like some of these changes were not announced with months of anticipation. The fact is that not all of us are paying close attention to what is coming. Sometimes we know what is coming but we are not able to evaluate the impact of the changes and the work that they will give us to solve all the potential problems.
Let me tell you about some things that are coming, so you can evaluate if it is something that will affect your sites, and what you need to do to at least minimize the impact of the changes.
5 Urgent Maintenance Tasks You May Need to Perform on Your Site Now
1. Adapt Your Site to Mobile Devices
With the exploding growth of users using their mobile phones to access the Web, Google decided that each site should provide those users a good experience adapted to the size of their screens.
So, starting April 21, Web pages that do not provide good user experience on mobile phones will loose ranking positions to other sites that provide better user experience.
Well, in the last months I have been working hard to provide a better user experience to mobile phone users that access the PHP Classes site, or at least the pages that have content the users may want to read.
The work is not finished because there many types of pages that were not yet upgraded. I have written an article recently to explain what I did to adapt web sites to mobile with the least of the efforts.
What if you do not adapt your sites to provide good user experience on mobile phones? Well, if you had some traffic from Google by users of mobile phones, you may loose that traffic until you fix your site. This change will not affect the traffic you get from users using desktop computers or even tablets.
Pedro Dias, former Google employee has written a nice article that clears many of the doubts you may have regarding this change. If you are Portuguese speaker, you may want to read the Portuguese version of the article.
2. Deprecation of the Old Google WebmasterTools API
Talking about Google, they are going to turn down the old WebmasterTools API on April 20. Maybe you were not using this API because you did not have any purpose for using it.
The PHP Classes site has been using it to detect pages that were not getting any search traffic probably because they do not contain enough content of interest for the users. This way the site marks such pages as non-indexable to avoid being affected by the Google Search Quality algorithm also known as Panda.
If you would like to try this API for getting the pages that your sites get traffic from Google, you may want to use the PHP Webmaster Tools API class that I developed for this purpose.
Google is turning down this API because it uses the old ClientLogin method, which is less secure than using OAuth 2. However, according to John Mueller from Google, parts of the API that allow downloading data listings in CSV format will still work until the newer API versions are updated to provide this information. So, the class I mentioned above is expected to continue to work.
3. Goo.gl shortener requires API key for shortening requests
Still talking about Google, Goo.gl is a well known service that can take a long URL and convert it into a shorter version. The PHP Classes site has been using it to shorten links to be included in Twitter posts.
Starting last month it stopped working claiming that it was getting unauthenticated requests. Here is a sample of the error response:
{ "error": { "errors": [ { "domain": "usageLimits", "reason": "dailyLimitExceededUnreg", "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.", "extendedHelp": "https://code.google.com/apis/console" } ], "code": 403, "message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup." } }
That was odd because I did not change my code nor the authorization tokens were revoked or expired. Only recently I discovered that I should pass the authorization token as a parameter named key in the API call URL.
I am not sure if I misunderstood the documentation and Google made the API compliant with the documentation, or Google broken the API somehow. Anyway, if you have this problem, now you know what is causing it and how to fix it.
4. Chrome 41 to consider insecure certificates with SHA1 signatures
Recently I received a notice from Godaddy because one SSL certificate that I purchased from them needed to be upgraded to use SHA2 because starting Chrome 41 certificates using SHA1 would be considered insecure and the browser would show that to the user like this:
Well, for now it does not look like this but I will certainly upgrade the certificate in the next days. If you are in the same circumstance, I advise you to check with your certificate issuer on how to upgrade your certificate to use a more secure signature.
5. Facebook Graph API 1.0 to Stop Working
If you have a site or a mobile application that integrates with Facebook somehow and you have visited the Facebook Developers site, you may have noticed that Facebook is urging all developers to make their applications work with at least Graph API v2.0, because v1.0 will stop working on April 30.
Actually Graph API v2.3 is already available. So if you need to upgrade, you may as well make your application work with the latest version, so your update efforts will last longer until you may need to update your Facebook applications again.
If you just need basic permissions like accessing the user profile, user email and the user friends, you probably do not need to change anything in your application.
However, if you need more advanced permissions like for instance publish posts in your users timeline, your application needs to be submitted to a review process before those permissions can be granted.
That was the case of the PHP Classes site. The review submission process had to be repeated several times until it was approved. The main issue is that the reviewers need to see screenshots of all the steps you are integrating your application with Facebook, so they can verify whether it is compliant with their policies.
In the case of PHP Classes, one step needed to be changed. Facebook does not allow your application to enter any predefined message on behalf of the user when you post in his timeline. That means you cannot put words in your user mouth.
If your application is sending automated posts with links to the user timeline, that is fine. You can define the URL, the title and the description of the link. You just need to leave the user message field empty. If you predefine the user message, your application will not be approved.
Conclusion
Well, these are just some of the painful maintenance tasks I had to deal recently. Most of us developers like better to build stuff rather than fixing things, that even sometimes are not wrong. Unfortunately maintenance tasks have to be done once in a while.
If you have questions or have other maintenance tasks you had or will have to do soon, please post a comment here, so we all can learn with each other experiences.
You need to be a registered user or login to post a comment
1,616,107 PHP developers registered to the PHP Classes site.
Be One of Us!
Login Immediately with your account on:
Comments:
4. Link uncomplete - Filip Komar (2015-04-17 21:40)
Link for Finding more mobile-friendly search results uncomplete... - 1 reply
Read the whole comment and replies
3. SSL Certificate and Chrome 41 - Jonathan Hilgeman (2015-04-15 20:37)
Many of us are already on Chrome 41. The reason we're not get...... - 0 replies
Read the whole comment and replies
2. Another Maintenance Task You May Need to Perform - Steve (2015-04-15 20:36)
In addition to those tasks mentioned, here is another site... - 0 replies
Read the whole comment and replies
1. YouTube API - Andre Luis (2015-04-15 20:35)
New version... - 0 replies
Read the whole comment and replies