Linking to specific tracks through the iTunes affiliate program - php

My iPhone app links to songs on the iTunes store, through the linkshare affiliate program, up until this point I had been creating the links manually - which albeit is time consuming but I had no problem previously. The application has new songs every day and manually creating the links is getting out of hand. However, having read through all the affiliate program documentation I cannot find a way of linking to a specific track on the store - without using the link builder. The only data on the song I have is the track name, artist name and album name.
Obviously I can use the search api, but that does not seem to enable the affiliate linking - so I cannot benefit from the sales.
http://itunes.apple.com/search?term='.$tracksearch.'&country=gb&media=music&entity=musicTrack&attribute=musicTrackTerm&limit=1
So my question is how would I go about linking to a specific track, through the linkshare affiliate program according to the three pieces of data I have?
(I am using PHP for any basic data interactions - just in case anyone offers any coded methods - bearing in mind i'd like to produce the link on the server so my app can simply fetch the data from there.)

Obviously I can use the search api, but that does not seem to enable the affiliate linking - so I cannot benefit from the sales.
The Search API is exactly the tool you want to use. The API will return you the link you need, it is up to you to affiliate encode the link after you have that information.
The encoding process can be found in the documentation here:
http://www.apple.com/itunes/affiliates/resources/documentation/linking-to-the-itunes-music-store.html

Related

How do 3rd Party Websites obtain in-game information /stats?

So I just finished making a sample model of Lol Name Checker within my local server. It checks the availability of a username for a game. Theres nothing mind blowing about it because all the information is available to the public on their website and even searching up their match history officially here. In a smart manner, the site compiles his own database based on the content he crawls through from other sites (I assume but this seems the case). What puzzles me is how other websites can obtain in-game data that is not available online (so they cant use php to crawl their web pages for text content). For example in this website. My question is how do they display data without having direct access to their sql database? Or is there an API I am missing for calling these functions that are available to developers (which I doubt)?

How do I retrieve a list of the pages visited on a particular day using the Google Analytics API?

We use Google Analytics on our site to track page views, and I am interested in getting a list of which pages were viewed on a given day. I'm not looking for the number of times a page was viewed primarily, as I know that this information is available if we need it. Rather I want a list of all of the unique URLs visited on the site for a given day. Is there a way to do this?
TL;DR
You can query the landing page dimension and visitor metric to get that data. For more info here is Google Analtyics query explorer and dimensions/metrics reference
Slightly longer answer:
Here is the dimension you would want to use.
ga:landingPagePath
Here is the metric you would want to use.
ga:visitors
This will give a report of the urls for the date range you want and the amount of traffic it got. If you don't care about the actual traffic you can just remove that once the data is pulled.
Here is more info/examples about google's data api's for python
If you are familiar with using the API, selecting these two dimenions:
Page
Date
and any of the relevant page-level metrics (pageviews, unique pageviews, etc.) will product the desired report.
Try using this link to shared-report from GA Query Explorer, I believe those are the numbers you want.

Is there any way to get the number of FB users on a specific country?

I would like to know if is there any possible way to show the total number of users of a specific country in my webpage. As far as I found, you can not get it through API.
I'm guessing you really want the total number of users on facebook who have 'liked' or used facebooks oauth to connected with your site.
Do you use graph api in your site? I'm pretty sure you can query by country name--as long as the user's who have shared that info with you have provided it.
Check this out... http://developers.facebook.com/docs/reference/api/
And this: http://developers.facebook.com/docs/reference/api/insights/
From their site
Facebook Insights provides the ability to see geographic and
demographic data for people that have Liked a Page or installed an
app. Location data is based on the geographic location of each person
as determined by their browser IP address and is limited to the top 20
countries and cities. All other demographic information is aggregated
and non-personally identifiable.
Generic searches can be done like this:
https://graph.facebook.com/search?type=location&place=166793820034304
Where the place id is the id for whatever you want to search on.
https://graph.facebook.com/search?type=location&place=166793820034304
Disclamer: This method is not supported by Facebook. Use it at your own risk. I take no responsibility whatsoever.
Go to: https://www.facebook.com/ads/manage/adscreator/
Fill in the ad info with something random (eg. google.com as the url)
In the next part you'll notice a dynamic reach estimation that changes depending on the parameters you select, including country. Try changing the country and observe the network activity with for instance the developers tools of Google Chrome.
Call the ajax url that returns the json data with the proper parameters programatically, this should be easy to figure out in the previous step.
Collect and store the json data for your evil deeds.
???
PROFIT!
The actual ajax call and parameters change from time to time, which is why I didn't include them directly, but it should be easy enough to figure it all out. Also note that they are estimates, even if they come from Facebook, they don't count every single user every time an advertiser sets up an ad — it's the best estimate you can possibly get though.
This method as I mentioned is neither official nor supported by Facebook, but sites like socialbakers.com or checkfacebook.com have been using them for ages. (There, I revealed the secret)

Barcode scanner for book site

I'm creating a social networking site for books (like Goodreads) and I'd like to include a feature whereby a user can scan the barcode of a book using the webcam and get information about that book.
The functionality for finding the information is already complete. I just need to know how to make the webcam read the ISBN and output it as a string, which I can then feed into my script which fetches the information. At the moment this is just done by filling in a form with the IBSN.
My website is built using PHP.
I can't seem to find a working solution online.
Any ideas of how I could go about implementing this?
Idea would be to use Flash barcode scanner. I've seen flash software that recognizes gestures and so on, so barcode shouldn't be that hard.
Here you can see it implemented: http://gurulib.wordpress.com/2007/12/28/a-flash-based-webcam-barcode-reader/

Twitter API grabbing/caching/parsing multiple streams

I need some thoughts in this :) I think i might be trying to do the impossible.
I’ve got a website with a lot of company profiles (300+).
I want to place a stream on every profile page, and allow the owner of that profile page to enter some keywords in the backend with the keywords they want the stream to display.
1 thing would be to do this with javascript on the fly, on every profile page.
But, since I want to use the combination of every profile stream on the frontpage and parse images in a tweet (yfrog, plixi) i thought it would be best to cache them into a mysql db, and work from there with PHP. (Maybe SEO advantage over Javascript? )
Is this even possible ?
My first bet was to make a REST call to the api with the keywords from all company profiles ,put them to the DB and store which keyword would be connected to that tweet.
Any thoughts on this ?
You could use the Streaming API with a track filter, that would allow you to capture all statuses matching the keywords your profile owners select. By default, you're limited to 400 keywords, but could ask Twitter to increase you're access level (they list a few levels in the documentation).

Categories