Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Google Webmaster Tools API
Octobus
post
Post #1





Grupa: Zarejestrowani
Postów: 259
Pomógł: 1
Dołączył: 3.07.2011

Ostrzeżenie: (0%)
-----


Korzystam z bibliteki google do api Google Webmaster tools jednak nie moge nic zrobic ... pojawiaja mi sie bledy moj kod:

  1. $client = new Google_Client();
  2.  
  3. $client->setApplicationName("Panel");
  4.  
  5. $client->setDeveloperKey("AIzaSyAaBecMN10zT1m6s8ax99Ufejpu-3Cmi3w");
  6. $client->setClientId('648632130150-0hi4rgtrjrcs0eakn84cs0517eb23rdj.apps.googleusercontent.com');
  7.  
  8. $service = new Google_Service_Webmasters($client);
  9.  
  10. $service->sitemaps->listSitemaps('fs.ovh');


i wyskakuje mi blad:


Warning: Missing argument 1 for Google_Client::authenticate(), called in /home/(...sciezka...)/_api.php on line 76 and defined in /home/(...sciezka...)/Google/Client.php on line 123



  1. Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Invalid code' in /home/(...sciezka...)/Google/Auth/OAuth2.php:88
  2. Stack trace:
  3. #0 /home/(...sciezka...)/Google/Client.php(126): Google_Auth_OAuth2->authenticate(NULL)
  4. #1 /home/(...sciezka...)/_api.php(76): Google_Client->authenticate()
  5. #2 {main}
  6. thrown in /home/(...sciezka...)/Google/Auth/OAuth2.php on line 88


Komunikat jasno wskazuje ze brak argumentu dla authenticate(), ale co tam umiescic ? Probowalem rozne rzeczy i zawsze dochodzilem do punktu wyjscia czyli tego, od 2 godzin juz to probuje rozkminic ...
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 04:11