Page 4 of 5

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 02 Sep 2011, 08:58
by m4rcel
gouxim said somewhere (don't know exactly where), that the MPWS will be pretty much the same as TMWS ;)

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 02 Sep 2011, 09:14
by w1lla

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 29 Feb 2012, 08:33
by bas_3008
Hello,
I am currently messing arround with your Trackmania WS SDK 2.0! :thumbsup:
It's great, but I have got 2 problems:

1. When I open /oauth2/guestbook/index.php from the examples, there's a

Code: Select all

Fatal error: Class 'TrackMania\WebServices\OAuth2\Base' not found in ~~~
In the OAuth2 directory, theres no Base.php, just Client.php and Players.php! Is that the mistake? Or do I make something wrong?

2. When I open /oauth2/basic/index.php , I click on "Login with your TrackMania Forever account", I login there, but then "Something went wrong, please try again later"! :(

Btw: I'm using xampp on my localhost to test this.
My TM-login is bas_3008, API-username is epic-lol.
I registered an OAuth2 application, named epic-clan.de, redirection URL is http://www.epic-clan.de.

It's the first time I'm working with a SDK, it would be great if you could help me with this.

Thanks in advance!

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 29 Feb 2012, 11:02
by gouxim
bas_3008 wrote:1. When I open /oauth2/guestbook/index.php from the examples, there's a

Code: Select all

Fatal error: Class 'TrackMania\WebServices\OAuth2\Base' not found in ~~~
In the OAuth2 directory, theres no Base.php, just Client.php and Players.php! Is that the mistake? Or do I make something wrong?
There's a bug in the example.
http://code.google.com/p/trackmania-ws- ... dex.php#86
Line 91 it shouldn't be new \TrackMania\WebServices\OAuth2\Base but new \TrackMania\WebServices\OAuth2\Player
bas_3008 wrote:2. When I open /oauth2/basic/index.php , I click on "Login with your TrackMania Forever account", I login there, but then "Something went wrong, please try again later"! :(

Btw: I'm using xampp on my localhost to test this.
My TM-login is bas_3008, API-username is epic-lol.
I registered an OAuth2 application, named epic-clan.de, redirection URL is http://www.epic-clan.de.
I checked in the DB, redirection URL is not "http://www.epic-clan.de" but "www.epic-clan.de".
Try to put with http:// in your OAuth2 application settings.
Also not that it can only work on that domain name. If you want to test it locally (on http://127.0.0.1) you have to create a username and an oauth2 app for that.

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 29 Feb 2012, 21:13
by bas_3008
Okay thanks!
I tried it - /guestbook/index.php now says:

Code: Select all

Fatal error: Call to undefined method TrackMania\WebServices\OAuth2\Player::getLogin() in D:\xampp\htdocs\trackmania-ws-sdk\examples\oauth2\guestbook\index.php on line 92
--

I changed the URL direction to http://127.0.0.1, opened /basic/index.php, I allowed access to my App and I got redirected to http://127.0.0.1/trackmania-ws-sdk/exam ... guestbook/ and ... okay, now it works. First time, I did that, there was a warning like "int(0) string" or something and I had to log in again. Now I'm authentified and I get my TrackMania data :thumbsup:
(but guestbook still doesn't work :| )

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 06 Mar 2012, 21:02
by bas_3008
When I'm logged in (/basic/index.php) and I refresh the page, it get

Code: Select all

int(401) string(12) "Unauthorized" string(0) "" 
Is this normal? :?

btw: it's on my webspace now, http://epic-clan.de/trackmania-ws-sdk/e ... /index.php

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 08 Mar 2012, 11:27
by gouxim
There was a bug in the SDK. I commited the fix, you can see the difference here:

http://code.google.com/p/trackmania-ws- ... Player.php

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 08 Mar 2012, 14:14
by bas_3008
Yeah! Works great now! Thanks! :thumbsup:

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 01 Apr 2012, 12:47
by Jojo_44
Hi,

the redirection for the logout doesn´t work anymore. At least for me ;)

regards, Jojo

Re: [beta] SDK 2.0 with Namespaces and OAuth2 support!

Posted: 03 Apr 2012, 10:02
by gouxim
I think it never have.
:lol: