Page 3 of 3

Re: Using ManiaHome Methods

Posted: 28 Oct 2011, 10:53
by gouxim
jonthekiller wrote:I have nothing new in the page.
I'm pretty sure your script for some reason fails before sending the request, and it doesn't display errors. Do you have a PHP error log on your side? You can also add that at the begining, so that every errors are transformed into an exception (that you will be able to catch with the try/catch block):

Code: Select all

function exception_error_handler($errno, $errstr, $errfile, $errline ) {
    throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
}
set_error_handler("exception_error_handler");
error_reporting(E_ALL);

Re: Using ManiaHome Methods

Posted: 28 Oct 2011, 11:27
by jonthekiller
I have found this

Code: Select all

[Fri Oct 28 12:23:06 2011] [error] [client 77.205.45.95] PHP Fatal error:  Call to undefined method Maniaplanet\\WebServices\\ManiaHome::postPersonalNotification() in /home/jonthekiller/public_html/Manialinks/loto/notif.php on line 23
I have the last version of the SDK and the folder is good, I use the same than ManiaConnect and my file is at the same place than other.

Re: Using ManiaHome Methods

Posted: 28 Oct 2011, 11:37
by gouxim
Ahhhhhh, I got it. I made the doc with the HEAD revision of the svn, but the last official release was a bit different. I'm preparing a quick package with the HEAD revision.

EDIT: you can download the 1.1 version at http://code.google.com/p/maniaplanet-ws ... loads/list ; just override the libraries folder with the new one

Re: Using ManiaHome Methods

Posted: 28 Oct 2011, 11:45
by fastforza
gouxim wrote:I meant "a Manialink URL". I updated the Wiki page.
:)
gouxim wrote:Probably not :teub:. For the whole user experience to be good, we want to avoid that when you click on a link it opens the Web browser. However, you can easilly do a Manialink page that opens a Web page ; that way the user experience is better as the players knows that if he continues, it'll open his web browser. For instance "themaniablog" do that in Maniaplanet, and TM-Carpark do that in TMF.
Fair enough. I'll work a link into the message instead. ;)

Re: Using ManiaHome Methods

Posted: 28 Oct 2011, 12:24
by jonthekiller
Now, I have this

Code: Select all

object(Maniaplanet\WebServices\Exception)#4 (9) { ["HTTPStatusCode":protected]=> int(400) ["HTTPStatusMessage":protected]=> string(11) "Bad Request" ["message":protected]=> string(190) "API username "jonthekiller|lottomania" is not allowed to post notifications for Manialink "lottery". You can configure that on the ManiaHome Manialink, in Options > Manager > Your manialinks" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(95) "/home/jonthekiller/public_html/Manialinks/loto/libraries/Maniaplanet/WebServices/HTTPClient.php" ["line":protected]=> int(332) ["trace":"Exception":private]=> array(2) { [0]=> array(6) { ["file"]=> string(94) "/home/jonthekiller/public_html/Manialinks/loto/libraries/Maniaplanet/WebServices/ManiaHome.php" ["line"]=> int(69) ["function"]=> string(7) "execute" ["class"]=> string(34) "Maniaplanet\WebServices\HTTPClient" ["type"]=> string(2) "->" ["args"]=> array(3) { [0]=> string(4) "POST" [1]=> string(33) "/maniahome/notification/personal/" [2]=> array(1) { [0]=> object(Maniaplanet\WebServices\Notification)#1 (9) { ["senderName"]=> string(7) "lottery" ["receiverName"]=> string(12) "jonthekiller" ["message"]=> string(46) "jonthekiller has bought a ticket on LottoMania" ["link"]=> string(7) "lottery" ["isPrivate"]=> NULL ["iconStyle"]=> string(16) "ManiaPlanetLogos" ["iconSubStyle"]=> string(22) "IconPlanetsPerspective" ["group"]=> NULL ["priority"]=> NULL } } } } [1]=> array(6) { ["file"]=> string(56) "/home/jonthekiller/public_html/Manialinks/loto/notif.php" ["line"]=> int(23) ["function"]=> string(24) "postPersonalNotification" ["class"]=> string(33) "Maniaplanet\WebServices\ManiaHome" ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> object(Maniaplanet\WebServices\Notification)#1 (9) { ["senderName"]=> string(7) "lottery" ["receiverName"]=> string(12) "jonthekiller" ["message"]=> string(46) "jonthekiller has bought a ticket on LottoMania" ["link"]=> string(7) "lottery" ["isPrivate"]=> NULL ["iconStyle"]=> string(16) "ManiaPlanetLogos" ["iconSubStyle"]=> string(22) "IconPlanetsPerspective" ["group"]=> NULL ["priority"]=> NULL } } } } ["previous":"Exception":private]=> NULL }

I have add my login "jonthekiller" on the manager.


In Manager / API, the link ManiaPlanet Developers Website doesn't work.

I need to add "jonthekiller|lottomania" in the API page and after it works now.

If we put the nickname, I have error http 500 but the nickname is already add automatically, maybe add this in the documentation.

Maybe add in the documentation, we need to add the API name in Maniahome for send notifications :thumbsup:

I have see if we would like delete the notification, maybe remove the format.
Sans titre.jpg

Re: Using ManiaHome Methods

Posted: 28 Oct 2011, 16:36
by gouxim
I fixed the link.
We'll probably update the pop-up windows when you want to delete an event, so we'll fix that.