Group: http://groups.google.com/group/adsense-api/topics
- JavaScript Samples [2 Updates]
- what's the first step in using the Adsense API for revenue sharing video [2 Updates]
Topic: JavaScript Samples
- ghenne <gh@nsbasic.com> Sep 21 10:31AM -0700 ^
I'm not sure what "query the API from a backend" means if it is a web app.
What kind of tricky SOAP stuff is there?
Perhaps off topic, we have been waiting almost 3 weeks for our AdSense
approval. Is that normal? Is there a way to bump the process?
"We don't have JavaScript samples because in our experience SOAP usage
from JavaScript might be tricky, and it's usually easier to query the
API from a backend.
If you have any specific question about usage from JavaScript please
post it on the forum, I'll do my best to help you.
Cheers,
Silvano"
- Silvano Luciani <silvano.luciani@google.com> Sep 22 02:12AM -0700 ^
Hi,
I'm sorry my previous answer wasn't clear enough, I'll try to explain
with an example.
Let's say that you have an application that displays a list of results
obtained querying the API. After some user activity, you need to
update the content of the list.
From the JavaScript/HTML frontend you make an asynchronous call to the
application backend, a server side application implemented in PHP,
Ruby, Python... The backend queries the API, formats the results and
returns the results to the JavaScript/HTML frontend that finally
updates the list on the page.
Regarding SOAP, there doesn't seem to be a lot in the way of support
in Javascript, and what does exist has limited support. Most likely
you will end up having to handle the SOAP XML parsing and generation
yourself, as well as dealing with all of the authentication and error
handling manually. In addition, you'll likely end up running into XSS
issues, given that your page and the web service you're contacting are
not in the same domain. The only way of getting around those would be
to use a proxy page, in which case you're better off doing all of the
SOAP requests server-side, as described on the paragraph above.
Cheers,
Silvano
--
Silvano Luciani | Developer Programs Engineer
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London
SW1W 9TQ
Registered in England Number: 3977902
- ghenne <gh@nsbasic.com> Sep 16 06:55AM -0700 ^
Do you have any JavaScript samples?
- Silvano Luciani <silvano.luciani@google.com> Sep 21 10:22AM -0700 ^
Hello.
We don't have JavaScript samples because in our experience SOAP usage
from JavaScript might be tricky, and it's usually easier to query the
API from a backend.
If you have any specific question about usage from JavaScript please
post it on the forum, I'll do my best to help you.
Cheers,
Silvano
--
Silvano Luciani | Developer Programs Engineer
Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London
SW1W 9TQ
Registered in England Number: 3977902
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To post to this group, send email to adsense-api@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.
No comments:
Post a Comment