Lately, I’ve consulted on a few projects which I’ve had to compare using an off-the-shelf script versus a custom solution. As a programmer myself, I typically build everything myself (because I can, and because I’m a control freak). However, I’m learning that there are some off-the-shelf solutions that do the job, and save both time and money.
I was excited when I read Google had released an API for their Affiliate Network, as I wanted to automate pulling sales data from GAN. But I quickly became disheartened when I realized how difficult it is to use.
Since this was for myself, and not a web-based service that would be used by others, the Simple API method of authorization was good enough. After getting it to work with Picasa, but not GAN, I asked for some help and was introduced to the OAuth 2.0 Playground. This showed me the headers I’d need to send, and how OAuth 2.0 works.
For the record: the Google Affiliate Network API does NOT support Simple API Access. You cannot access the service with an API Key and IP locking.
I now have a working script, and have written up step-by-step instructions on how you can pull orders from GAN automatically each day.
This script is not complete, as it’s up to you to do something with the data once you have it. You can also modify the final call to pull advertisers, instead of orders.
There was a Tweet that was going around today:
[blackbirdpie id=”60389972049543168″]I had a need to get some data that wasn’t available in the merchant’s datafeed, and since I wasn’t going to be putting a huge burden on the merchant’s site (ie: if you scrape, be nice*) I decided to write a little scraper to do so.
In this script, I’m using all, pure PHP functions: cURL, Document Object Model, SimpleXML. By using PHP’s built-in functions, the script will be as portable and efficient as possible.
At the time of writing this, Facebook’s Like
(or Share
) button acts the same as sharing or posting a URL to your wall, except you don’t have the chance to leave a comment or choose which image to include with the post.
If you post a link to your wall, Facebook will guess at which images on the page may be best suitable for the page, and allow you to choose from several of them