Skip to main content

Posts

Showing posts from 2012

Basic Authorization with Coldfusion

When trying to access a webservice or a rest api you might need authorization, this can be done simply by sending the username and password throw the cfhttp as the below: The respond you might receive is as below: 200  - OK - Everything went fine. 400s - all caused by user interaction 400  - Bad Request - The request was malformed or the data supplied by the end user was not valid. This is also used if the user has exceeded their API usage limit. 401  - Unauthorized - The user is not authorized to access the requested resource. Additional information is typically supplied within the response to tell the end user (API consumer) how to authorize itself (ie. BASIC Authentication). 403  - Forbidden - The user has exceeded their post limit (not bloody likely). 404  - Not Found - The requested resource was not found. 405  - Method Not Allowed - The user attempted to use a verb (ex. GET, POST) on a resource that had no support for the given verb. 406  - Not Acceptable - The user

Clear your history before Google overhaul

Time is running out to clear your browsing history before Google's new privacy policies come into force. In the past, data collected in the course of a web search would be kept separate from your YouTube viewing activity or your Google email usage and map queries. But on Thursday the search engine giant will change the way it collects and collates data about its users, saying it is simplifying things and offering a better individual browsing experience. Google's new privacy policy will affect millions of those with a Google account, including anyone who use Gmail, YouTube or any of the company's other 60-plus services. It will also affect anyone with a smartphone using Google's android operating system. Seamus Byrne, editor of consumer technology site CNET Australia, says Google will build a "much more intelligent picture of who you are". "They'll target ads to you a lot better based on that information," he said. Full Article

Publish to Wordpress using JSON API plugin and Coldfusion

I was using Postie to automatically publish to wordpress blog. I was searching a better method of publishing using soap api or json api. I found an excellent json plugin  that can be used to publish posts and comments to wordpress. Please follow the below step by step, this code will let you publish automatically for froma different interface to wordpress rather than using postie or email. Step one: Install json plugin , enable the plugin and then go to settings > JSON API and  activate post Step two: you have to modify the file: yourwordpressdirectory/wp-content/plugins/json-api/controllers/post.php Please replace the file content with the below or add the missing Authenticate method. This method is necessary to authenticate a user to wordpress to be able to post content without a valid session. <?php /* Controller name: Posts Controller description: Data manipulation methods for posts */ class JSON_API_Posts_Controller {    public function crea