How to save in MySQL

52 views
Skip to first unread message

drtanz

unread,
Jan 9, 2012, 11:24:56 AM1/9/12
to adsen...@googlegroups.com
I've been following the examples on the new API, I'd like to know how I could persist authentication data into a MySQL database. Thanks.

Sérgio Gomes

unread,
Jan 9, 2012, 11:31:29 AM1/9/12
to adsen...@googlegroups.com
Hi there!

Which programming language are you using? Also, are you using the Google API client library for that language?

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902

drtanz

unread,
Jan 10, 2012, 4:54:24 AM1/10/12
to AdSense API Forum
I'm using PHP and yes I'm using the API client library for it.

Sérgio Gomes

unread,
Jan 10, 2012, 5:51:47 AM1/10/12
to adsen...@googlegroups.com
You've got a sample here using SQLite (take a look at the "authenticate" method): https://code.google.com/p/google-api-php-client/source/browse/trunk/examples/adsense/AdSenseAuth.php

It's a very basic sample, but it should be trivial to modify it to work in MySQL. Also, if you need multi-user access, you'll need to save a token per user, rather than a single one as shown in this sample.

Hope this helps!

drtanz

unread,
Jan 10, 2012, 5:51:05 PM1/10/12
to AdSense API Forum
Thanks I'll try that out and see whether I manage.

On Jan 10, 11:51 am, Sérgio Gomes <sergio.go...@google.com> wrote:
> You've got a sample here using SQLite (take a look at the "authenticate"
> method):https://code.google.com/p/google-api-php-client/source/browse/trunk/e...
Reply all
Reply to author
Forward
0 new messages