September 9, 2011
18 SEO Fundamentals According to Bing
When there are too many versions of the same advice available, people often feel confused when it comes to deciding on which version is the right one.
This applies especially to SEO. So the big question remains how can website owners crack the SEO code and make the most out of it?
The team at Bing have stepped up with a list of 18 SEO fundamentals for webmasters and website owners who want to optimize their sites for better rankings on Bing. This list includes some vital pieces of information that are useful, especially to all those who wish to set a firm foot in the SEO world and want to benefit from search marketing.
The list delves into some basic principles that will help anyone plan and put together a website from scratch or improvise an existing website, before actually marketing it on Bing.
Here is the full list :
The Do’s
- Crawlability: Make sure your site is crawl able by using an XML sitemap, a robots.txt file, and well-structured on-site navigation.
- Create an RSS feed.
- Use schema.org markup.
- Improve your site structure by using an HTML sitemap and linking to trusted sources both within your site and outside of it.
- Create a solid content hierarchy by doing basic keyword research and avoiding placement of your content in rich media such as Silverlight and Flash.
- Use a short meta title that has fewer than 65 characters and that’s unique to each page, and try to include the targeted keyword toward the beginning of that title.
- Use a unique meta description tag.
- Create quality content (following the guidelines Bing provided earlier).
- When you build links, focus on keyword-relevant anchor tags that link back to quality content on your page.
- Create a page that is user friendly. Page load time (PLT) is a crucial factor here as Bing states that website with PLT of ¼ second and above leads to loss of visitors.
- Encourage social sharing with the use of social buttons.
The Dont’s
- Don’t cloak your website.
- Don’t use link farms.
- Don’t engage in three-way linking.
- Don’t duplicate content.
- Don’t use auto-following on the social front.
- Don’t use thin content.
- Don’t buy links in bulk. Slow and steady link building is any time better than buying some hundreds of low quality back links.
Now that you have heard the real story direct from the horses’ mouth, there is no reason why you should not be implementing these into your website’s marketing plan now.
Filed under Blog, SEO by Rene LeMerle
September 7, 2011
Data Enrichment – Enhancing Online Data
We closed all X Change Registration at the beginning of last week – sold out and then some! Next Sunday I’ll be heading down to San Diego and Monday things get started with Think Tank Training and the Opening Reception Cruise. Can’t wait!
Before I get too derailed, however, I wanted to put out the next installment of my series on Database Marketing and Web analytics.
I often show a slide in my presentations that shows two big Venn-diagram circles. One is for Web Analytics and one is for Database Marketing. It looks like this:
In talking about it, I try to explain how our mission at Semphonic is to take the good stuff from the Database Marketing circle and move it over into the channels that actually matter these days (Digital). So with a little animation, I slide everything over to look like this:
I don’t think anything better illustrates this dichotomy or serves as a more visible proof of how little use Web analytics data actually gets than the almost complete absence, until quite recently, of any attempts to really improve online data.
Contrast this with the huge market in data enrichment of traditional data. There are companies (very large companies) who have built a business of taking any piece of data you have and matching it up with what they have and then giving you back a whole bunch more data than you started with. Companies like Acxiom and Experian can take a single identifying piece of data (phone, address, email) and give you back hundreds – literally hundreds – of additional data items. To do this, they’ve built up vast Household databases drawn from almost any conceivable public (or acquirable) source. From census data to change of address records to phone books to professional associations to property records, they have scoured out potentially interesting data and added it to their vast files.
Where data is worth something, companies INVEST in it.
Along with all this data comes, of course, a variety of services for cleaning and combining it. You can household records together (combining members of a family), scrub addresses and phone numbers, add gender (based on known data or even derived from your first name), age, income, occupation, ethnicity and even append a whole list of potential interests culled from catalog purchases, magazine subscriptions, and credit card data.
Until fairly recently, however, you couldn’t do much with online data and nobody was much interested in investing to improve it.
That’s changing.
Companies like Blue Kai and Blue Cava (not sure why Blue is a common motif) have created interesting data enrichment services around online data. Using these services, you can track (via 3rd Party cookie and other device identification techniques) a users site interests and you can weld together their behavior across multiple devices.
Services of this sort have come under fire from the privacy community – and certainly they come much closer to the “line” than traditional Web analytics. I’m not sure how I feel about this. I’ve always disliked techniques like “flash cookies” that seem like willful attempts to bypass consumer control. It doesn’t seem to me, however, that 3rd Party cookie tracking falls into that category. I do worry that Web analytics practices will get conflated with the aggressive collection and sale of browsing information and that traditional Web analytics will end up the proverbial “baby” flying out the window with the bathwater. Still, I have to wonder if the online privacy community understands how much offline data has been made public, aggressively collected, and marketed wholesale. Like airport security, it doesn’t always seem like the lines we draw make much sense.
Indeed, the traditional Database Marketing companies haven’t been quiet in this realm. They’ve built up formidable email databases (email is the de facto key when it comes to online communication) and can provide a full range of services around this – from email append (you add emails to customers in your database where you have only traditional offline information) to full HH lookup services (you have an email and they provide everything else). Given legitimate collection and use, I don’t see how this practice is distinguishable from the collection and use of address or phone data and seems eminently acceptable.
In database marketing, data enrichment is a key part of the value chain. Adding, appending and cleaning data based on this type of enrichment greatly extends the value of each core piece of data. And for proof of how valuable such data is, you need look no further than the marketplace it supports.
For online data, however, the enrichment of data is even more useful.
To explain why, I’ll hearken back to one of my first posts in this series. The core method in marketing analytics is to create a bridge between the behavior we track and the customer and his intentions. This entire 2011 series has been an extended effort to explain how that can best be done with digital data. No matter how successful you are at this endeavor, though, it will still leave gaps in understanding – both about the visitor and the visit type. Data enrichment can fill those gaps – particularly around the visitor. If we assume that visit-intent is best assessed using behavioral techniques (and I think that’s right), there’s a strong argument that visitor-type is best assessed with a combination of your internal data (the Customer Data Warehouse) and external data via enrichment.
That’s the traditional path for segmentation based on visitor type and I see no reason why it shouldn’t hold true for online customers as well. It’s particularly important for online data because we often know so much less about our online visitors than our traditional offline customers.
Currently, we’re in the odd position of working hardest to enrich the data about the customers we already know the most about. That’s not entirely foolish (those are often the most valuable customers too), but it’s certainly not a comprehensive strategy.
At Semphonic, we’re starting to see vastly increased interest levels in the full range of online data enrichment providers. That’s the best evidence I’ve seen that companies are actually getting serious about online data.
So over my next couple of posts in this series (probably interrupted by X Change posts), I’m going to cover some of the types of data enrichment services worth considering and the companies who provide them.
[For a recap and links to most of the posts in the series, click here.]
Filed under Blog, Database by Gary Angel
September 6, 2011
Install a new typeface / font in Mac OS X 10.7 Lion?
What’s the fastest way to install a new font on my iMac if I’m running Mac OS XLion?
Dave’s Answer:
First off, a bit of a diatribe. What you’re asking about is the installation of a typeface, not a font. A font is a specific version of a typeface. For example, Times Roman is a typeface, while Times Roman 14pt is a font. It’s an ongoing pet peeve of mine (muchly because my Dad was a typeface designer) that we’ve lost the important difference between the two words. Remember, a font is specific, a typeface is general, and a typeface family? Well, that’s even more generic.
Now, on to your question!
Turns out that it’s rather amazingly easy to install a new typeface — cough, cough, not font — in Mac Lion. In fact, it’s really just a double-click away from being installed.
Here’s a typeface that a colleague sent me for a project we’re doing together:

To install it, I simply double click on the icon and it shows me a preview of Velocette in the Finder:

Nice typeface, eh?
To install it, I simply click on the “Install Font” button (even though it should really say “Install Typeface”, right?) and it not only copies the font data file to the correct place in Mac OS X, but it also then opens up the Font Book app so I can see that it’s installed:

That’s it. Done deal.
To test it, I’ll pop open a Stickies note and change the font to Velocette:

Now you can delete the original file to save space. Easy enough?
Filed under Blog, Mac by Dave Taylor
Scoping can be thought of as “the extent of information hiding.” In other words, scoping tells you where variables and methods can be seen from. Java has a neat approach to this that is both expressive and organized.
All variables are associated with a scope. Any single scope can be called a namespace. The use of namespaces allows one to associate variables with certain scopes. The benefit of using namespaces is that the programmer can use the same variable names in different scopes and ensure that variables from one section of code do not bleed into another. In other words, if multiple programmers are working on the same project more than likely they will be using the same variable names and using namespaces allows them to do so.
Scopes can do three things:
- Contain variables (declarations)
- Contain methods (statements)
- Nest and be nested
The “root” of all namespaces is the global namespace. So, all variables in the global namespace are globally scoped. Java has no global variables because it has no global namespace. Variables are scoped within a class or the method of a class. To make this even more interesting, variables that are scoped within a class are shared across all instances of that class. So, in a sense, class variables behave like global variables.
So, how does one make a namespace in Java? The use of packages accomplishes this. Java packages can be included by other packages and the variables and methods within can be accessed by the package’s prefix followed by the variable or method identifier (variable or function name).
Java uses block scoping where variables are unset at the end of a block of code. So, at the end of a class or a function the methods and variables will not live beyond that block of code. Java’s use of packages is a powerful setup and helps organize code in a very concise and expressive manner.
Filed under Blog, Java by Joe Purcell
September 2, 2011
A Tutorial on XML Sitemaps
Sitemaps are an ingredient that completes a website’s SEO package. They are certainly still relevant, since they ensure content is not overlooked by web crawlers and reduce the resource burden on search engines. Sitemaps are a way to “spoon feed” search engines your content to ensure better crawling. Let’s look at how this is done.
Format
The sitemap file is what search engines look for. The elements available to an XML sitemap are defined by the sitemap protocol and include urlset, url, loc, lastmod, changefreq, and priority. An example DOM looks like:
http://example.com/ 2006-11-18 daily 0.8
Sitemaps have a 10 MB size limit and cannot have more than 50,000 links, but you can use more than one file for the sitemap. A sitemap that consists of multiple files is called a sitemap index. Sitemap index files have a similar, but different format:
http://www.example.com/sitemap1.xml.gz 2004-10-01T18:23:17+00:00 http://www.example.com/sitemap2.xml.gz 2005-01-01
There are all kinds of sitemaps, ones for web pages, ones tailored to sites with videos and other media, mobile, geo data, and more. As long as it is within the cost-benefit for achieving better SEO, take the time to become familiar with the different types of sitemaps and make one that best fits your website’s architecture.
Location
Sitemaps can be named anything, but convention is that a sitemap will be named ‘sitemap.xml’ and is placed in the root of the site, so http://example.com/sitemap.xml. If multiple files are needed they can be named ‘sitemap1.xml’ and ‘sitemap2.xml’. Sitemap files can also be compressed, such as ‘sitemap.gz’. One can also have sitemaps in sub directories or submit them for multiple domains, but the cases for needing such are very limited.
Submission
Sitemaps are recognized by search engines in three ways:
- Robots.txt
- Ping request
- Submission interface
First, sitemaps can be specified in the robots.txt as follows:
Sitemap: http://example.com/sitemap.xml
The robots.txt file is then placed in the root of the domain, http://example.com/robots.txt, and when crawlers read the file they will find the sitemap and use it to improve their understanding of the website’s layout.
Second, search engines can be notified through “ping” requests, such as:
http://searchengine.com/ping?sitemap=http%3A%2F%2Fwww.yoursite.com%2Fsitemap.xml
These “ping” requests are a standard way search engines allow websites to notify them of updated content. Obviously, the domain (i.e. “searchengine.com”) will be replaced with say “google.com”.
Lastly, every major search engine has a submission tool for notifying the engine that a website’s sitemap has changed. Here are four major search engines and their submission URLs:
Google – http://www.google.com/webmasters/tools/ping?sitemap=
Yahoo! – http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=SitemapWriter&url=
Ask.com – http://submissions.ask.com/ping?sitemap=
Bing – http://www.bing.com/webmaster/ping.aspx?siteMap=
The ping requests do not respond with any information besides whether or not the request was received. The submission URLs will respond with information about the sitemap, such as any errors it found.
If your website uses WordPress or the like, there are great plugins such as Google XML Sitemaps which will do all this heavy work for you: creating sitemaps and notifying search engines including Google, Bing, Yahoo, and Ask. There are also tools for creating sitemaps such as the XML-Sitemaps.com tool or Google’s Webmaster Tools.
As we’ve said before, making sitemaps “shouldn’t take precedence over good internal linking, inbound link acquisition, a proper title structure, or content that makes your site a resource and not just a list of pages.” However, taking just a little bit of time with a good tool will help you complete your SEO package with a sitemap. Take this tutorial and make your site known!
Filed under Blog, XML by Joe Purcell
For this week’s tutorial, I will show you how to make objects that you place on the stage visible and invisible using the visibility properties in ActionScript. As an example of this, I will be using the idea of turning a light switch on and off.
To start this tutorial, create a new Flash document with the default stage properties of 550 pixels wide by 400 pixels high.
Step 1: Importing the objects into Flash:
After you have created the new Flash document, we are ready to import the images that we will be using as a light switch. For this example, I will be using the images displayed below; however, you are more than welcome to use your own images.

To import these images into Flash after you have them saved to your computer, click on the File menu, and then select the Import to Library option from this menu. This will load an “Import to Library” window (looking similar to an “Open” window) that will let you select the files that you have downloaded. When you have chosen the files, click on the “Open” button, and the files will automatically be loaded into your Flash document’s library.

(If the Library is not open for you by default, you can open it manually by opening the Window menu, and then selecting the “Library” option.)
Step 2: Placing items on the stage:
To place both of the images that you have just imported onto the stage, individually drag the name of the files from the Library onto the stage itself. You do not need to worry about exact placement yet, so you can place the images where you would like for the present.

After both of the items have been placed on the stage, we will need to convert them to buttons for them to easily interact with the ActionScript that will be working with later. To do this, select one of the images that you just placed on the stage and then press the F8 key on your keyboard. This will open the “Convert to Symbol” window (as shown below). Within this window, please assign the following parameters:

-
(For the light on)
- Name: Light On
- Behavior: Button
For the light off conversation, make sure that the behavior is set to “Graphic,” but just set the name to “Light Off.”
Now that both images have been converted to buttons, we will need to assign an “Instance Name” to them so that we can refer to them in the ActionScript code. To do this, select the first image, and then enter a one-word name associated with the image that you would like to use within the “Instance Name” field in the Properties Inspector. For example, the “Light Off” image will be named “lightoff” (without quotes). Repeat this step for the image with the switch turned on.

Step 3: Applying the ActionScript:
We are now ready to apply the ActionScript to “visually” turn the light switch on and off; however, to make this effect, we will be toggling each image’s visibilty.
To apply ActionScript to the buttons, click on the button that you have assigned “Light On” and then open the Actions Inspector. With the image selected and the Actions Inspector open, insert the following ActionScript code:

on (release) {
_root.lighton._visible = false;
_root.lightoff._visible = true;
}
This ActionScript code tells the Flash animation that when you release the mouse button, you would like the object you just clicked (lighton) to not be visible and to turn the visibility of the light on switch off.
We will be placing similar ActionScript code for the “Light Off” object. To do this, select the “Light Off” object on the stage, and in the Actions Inspector, insert the following ActionScript code:
on (release) {
_root.lighton._visible = true;
_root.lightoff._visible = false;
}
Step 4: Finishing Up the Flash Animation:
Now that the ActionScript code has been implemented, we are now ready to make the Light Switch animation more realistic. With your mouse or cursor keys, drag the “Light Off” object on top of the “Light On” object. This will make the light switch visually appear as one object (as shown below).

You are now ready to test your Flash animation. To do this, click on the Control drop-down menu and select the “Test Movie” option. When testing the movie, click on the light switch, and it should toggle between the two light switch objects that you have been working with. I have provided a sample of what the finished product should look like below:
Filed under Blog, Flash, Tutorials by Chad Sweely
In an important change in the Webmaster Tools, Google has changed the way to categorize link data.
This means that reporting links will now be handled in a different way in Google Webmaster Tools. And the big change is that subdomain links will now be considered as external links, but as internal links.
What Has Changed
The Webmaster Tools lists the links to your site as external links (links coming from other sites), and internal links (links from within your site). And links from subdomains will now fall under external links. This update will not have any effect on the number of links, but you will get a clear picture on the origin your backlinks.
What Has Changed
The Webmaster Tools lists the links to your site as external links (links coming from other sites), and internal links (links from within your site). And links from subdomains will now fall under external links. This update will not have any effect on the number of links, but you will get a clear picture on the origin your backlinks.
Why Has It Changed
Google said in their Google Webmaster blog that this is applicable to “www” and “non www” versions and the other subdomains on the domain name. Earlier, internal links were the links that began with your site’s exact URL. So, if your domain is entered as www.mydomain.com, then the links from mydonain.com would be considered external (they are without the www, so do not match the exact URL). But now, Google has changed the ropes.
Google said “Most people think of example.com and www.example.com as the same site these days, so we’re changing it such that now, if you add either example.com or www.example.com as a site, links from both the www and non-www versions of the domain will be categorized as internal links. We’ve also extended this idea to include other subdomains, since many people who own a domain also own its subdomains—so links from cats.example.com or pets.example.com will also be categorized as internal links for www.example.com.”
What Will Happen Now
Well, it is obvious now, that the number of external links will go down, as they are now being categorized as internal links. The search engine giant says that the new link number will now be more accurate than before.
What Remains To Be Answered
It remains to be seen that how will Google deal with listing subdomains in the Google search results. Also when it will rank you page’s links, how will the algorithm treat the links from subdomains, that are not from your domain. And what about the link weight of the links from subdomains of your site? Well, this too remains unanswered as of now.
Filed under Blog, Development by Navneet Kaushal
For this week’s tutorial, I will show you how to make objects that you place on the stage visible and invisible using the visibility properties in ActionScript. As an example of this, I will be using the idea of turning a light switch on and off.
To start this tutorial, create a new Flash document with the default stage properties of 550 pixels wide by 400 pixels high.
Step 1: Importing the objects into Flash:
After you have created the new Flash document, we are ready to import the images that we will be using as a light switch. For this example, I will be using the images displayed below; however, you are more than welcome to use your own images.

To import these images into Flash after you have them saved to your computer, click on the File menu, and then select the Import to Library option from this menu. This will load an “Import to Library” window (looking similar to an “Open” window) that will let you select the files that you have downloaded. When you have chosen the files, click on the “Open” button, and the files will automatically be loaded into your Flash document’s library.

(If the Library is not open for you by default, you can open it manually by opening the Window menu, and then selecting the “Library” option.)
Step 2: Placing items on the stage:
To place both of the images that you have just imported onto the stage, individually drag the name of the files from the Library onto the stage itself. You do not need to worry about exact placement yet, so you can place the images where you would like for the present.

After both of the items have been placed on the stage, we will need to convert them to buttons for them to easily interact with the ActionScript that will be working with later. To do this, select one of the images that you just placed on the stage and then press the F8 key on your keyboard. This will open the “Convert to Symbol” window (as shown below). Within this window, please assign the following parameters:

- (For the light on)
- Name: Light On
- Behavior: Button
For the light off conversation, make sure that the behavior is set to “Graphic,” but just set the name to “Light Off.”
Now that both images have been converted to buttons, we will need to assign an “Instance Name” to them so that we can refer to them in the ActionScript code. To do this, select the first image, and then enter a one-word name associated with the image that you would like to use within the “Instance Name” field in the Properties Inspector. For example, the “Light Off” image will be named “lightoff” (without quotes). Repeat this step for the image with the switch turned on.

Step 3: Applying the ActionScript:
We are now ready to apply the ActionScript to “visually” turn the light switch on and off; however, to make this effect, we will be toggling each image’s visibilty.
To apply ActionScript to the buttons, click on the button that you have assigned “Light On” and then open the Actions Inspector. With the image selected and the Actions Inspector open, insert the following ActionScript code:

on (release) {
_root.lighton._visible = false;
_root.lightoff._visible = true;
}
This ActionScript code tells the Flash animation that when you release the mouse button, you would like the object you just clicked (lighton) to not be visible and to turn the visibility of the light on switch off.
We will be placing similar ActionScript code for the “Light Off” object. To do this, select the “Light Off” object on the stage, and in the Actions Inspector, insert the following ActionScript code:
on (release) {
_root.lighton._visible = true;
_root.lightoff._visible = false;
}
Step 4: Finishing Up the Flash Animation:
Now that the ActionScript code has been implemented, we are now ready to make the Light Switch animation more realistic. With your mouse or cursor keys, drag the “Light Off” object on top of the “Light On” object. This will make the light switch visually appear as one object (as shown below).

You are now ready to test your Flash animation. To do this, click on the Control drop-down menu and select the “Test Movie” option. When testing the movie, click on the light switch, and it should toggle between the two light switch objects that you have been working with. I have provided a sample of what the finished product should look like below:
Filed under Blog, Design by Chad Sweely
The search engines are waging a never ending battle against black hat SEO techniques. They tweak their algorithms, and bring in huge changes like the Panda, to clean up black hat results from search. If you or your SEO firm have been practicing black hat SEO, then beware, or the engines’ wrath may fall upon you.
Take the right road ahead- get on the White Hat SEO wagon, and see your site getting its desired position. With no risk of penalization from the engines or being whacked by the Panda.
The Best White Hat Techniques:
Explained below are the optimization techniques, that will not fail you, and take your site to the target audience and even achieve conversion goals.
Content-
Post the latest algorithm updates, content is the key to successful SEO. So you begin by having informative and relevant content on your site. And you can do these simple activities too.
Write Articles- Article Marketing is the basic and the first step to ethical SEO. Make sure you write articles that are unique, updated and highly relevant to your niche. Then submit the same to leading article sites. You must remember to have your prominent keywords in the title, description, anchor text. The anchor text must direct the reader to your site.
Post Blogs- You must write detailed and highly informative blogs on your niche, and post them on your site. You can also do guest posting on sites that are related to your niche. To find the sites looking for guest bloggers, look at place like- http://myblogguest.com/.
When you guest post, remember to leave a link back to your site for reference. Have the keywords in the title for best results. You can ask for fellow bloggers in the site to link to you, but again make sure that your site is top notch in content and the information, that you are driving people for, towards your site.
Linking- Social is the way to drive huge and targeted traffic to your site. It will work for you, if you come across as a genuine person and make a connect with your user base.
Forum Signatures- Forums are the most trusted source of information and knowledge exchange on any topic or niche. You have to find the ones in your niche that are the most influential, and post there. They allow you to have links in your signature, so you comment on a post, give an answer, and leave your signature behind with your link and keywords in the same.

Blog Commenting- Get around to the prominent and influential blogs/write ups in your niche and leave quality comments and drop your links in the comment area. Do not go overboard here. Do not spam. The comment must be informative and insightful. Something like- “Great Post” will not work. You have to gain credibility as an avid member of the niche, and hence you must sound informed.
Video Marketing- Using videos to make an instant impact on the users can be a very effective White hat SEO technique. YouTube and other popular video websites are the best place to start promoting your site. Create a few videos with your keywords in them, post them on the sites with links to your site, and keywords in your description. More on video SEO here.
Also, keep commenting on related videos as well, and contact people for guests posts etc. They may respond well as they are from your niche.
You can also do an advanced Google search to find sites which you can contact to get links from.
One such search example is- intitle:add+url “keyword phrase”
More on Linking here.
Social- Social is the new SEO, this is the thought that is prevailing in SEO chatrooms these days. You can use the same for White Hat SEO too. The key here is to make a real connection with the users. So that they share your content of their free will, and it spreads as people tend to believe what their acquaintances say, rather than strangers.
Networking Sites- Social media sites like Twitter, Facebook, MySpace and the latest Google+ have a huge user base, and you can use that. Set up a page here, add all your information, and keep posting the latest happenings-articles and pictures. Indulge users by putting up interesting posts. Interact with them and make a connect. You have to be social on social network.
On these networks, follow the sites/people that are in your niche and can be very influential. Get them to share your content. And see your stuff go viral. More on leveraging social media here.
The takeaways-
When it comes to White Hat SEO, in the current scenario, it boils down to one thing- Content. You have to create content that is original-interesting and relevant for the users. Also it must be search engine friendly too. Achieving the same will prove to be a fail safe formula for search engine ranking success.
Filed under Blog, Development by Navneet Kaushal
September 1, 2011
A Tutorial on OAuth, Part 5: API Calls
If the third step, user authentication, is the most confusing, making API calls is the most tricky. Here we will look at a general overview of what making API calls is all about and then look at a basic overview of what is involved in an API call.
What is an API Call?
Let’s use an analogy to explain what an API call is. Think of how you use email. You send a message to someone and they send a response accordingly. Looking more closely at this, you are sending a message from your own username at the domain that hosts your email that is tailored to the username at the given domain you are sending it to. If the person you are sending the email to doesn’t know you, you may not get a response, or a bad one. Or, perhaps the person who got your email didn’t understand what you were saying and they respond with irrelevant information. This analogy can go a long way in explaining how OAuth and API calls work. Suffice it to say that an API call is a message sent with the intent of receiving certain information. OAuth lays out the semantics of what the messages sent and received should look like.
API calls are awesome, rather, good APIs are awesome and make web developers very happy. Every API is its own flavor, tailored to the application it is purposed for. Because of this, not every API that implements OAuth will do so in the same way. Combining this with how complex and sensitive OAuth is, this makes web developers batty and makes them want to throw things.
Now, let’s look at a more technical way of explaining what an API call is. In OAuth language, an API call is a resource request made by a consumer in order to access the protected resources of a user. Some resources are unprotected, such as Twitter’s public stream, but it still requires that the entity requesting the information be an authenticated user when making the call. The OAuth specifications define the semantics of API requests and responses.
5. Resource Request
A resource request involves sending signed parameters to a resource endpoint of a service provider. If the request is authentic, the service provider will respond according to their API specifications. There are four essential steps to making a resource request:
- Send Parameters
- Base String
- Signature
- Sending the Request
The first step gathers the parameters to send which are then used in the second step which formulates a base string that is then used in the signature. Though the HMAC-SHA1 algorithm is not the only supported method, it is the most widely used. This signature method takes two pieces of data, the base string and the consumer secret concatenated with the access token secret, and runs them through an algorithm that spits out the signature digest. The digest, or what is commonly just referred to as the signature, is then added to the send parameters and the request is sent.
Where OAuth revolutionized the process of transferring information is in ensuring the integrity and authenticity of those requests. Every request has a signature attached to it. When the service provider receives that signature it will compute the signature with the data given and then compare the signature they computed with the one that was sent in the request. If the signatures do not match it means one of three things. First, it could simply mean that the entity sending the request is authorized, but failed to compute the signature correctly. Second, it could me that in fact the entity sending the request isn’t authentic: they aren’t using the right tokens and are trying to obtain private information. Or, third, it could mean that the request sent was incomplete, similar to the use of checksums.
Each step must be executed absolutely perfect. Even if one character is misplaced the signature will be wrong and the request denied by the server. As said, making API calls is the most tricky and the technicals can be very boring and tedious. Everything has to be absolutely perfect. Hopefully, this overview of the basic technicals will help make it more clear, and even more so, hopefully, this whole tutorial can help put into perspective what a wonderful technology this is. Next time we will look at the specifics of forming resource requests.
Filed under Blog, Development by Joe Purcell


