FLindblomMemberFrom: SwedenRegistered: 2008-02-26 Posts: 278website
OK, this might be something I'm doing wrong I suppose but it never happened to me before on my app.
My script handler credits based on the script for example on github.
This is where to get the UID of the buyer:
According to my logs I had this code only return something like uid = 1.0000001234567 E + 14.
So now I try this:
That is still checked. But it would be too much and request json encode full board the UID as string? I'm sure that not only one running into this, I don't know if it's too late to convert (String) at this point or not. If uid bigint broken early as on encoding certainly modify json_decode.
But I guess he discovered long ago if it was, so I hope my revision to work the next time a user with a UID greater comes along.
Jonny5alive_ Moderator But Do _Note: 2007-11-06 Posts: 5330I think it is certainly the most appropriate format string for a UID.
You can try this code to deal with this:
FLindblomMemberFrom: SwedenRegistered: 2008-02-26 Posts: 278websiteBut as it turns out, this data is already corrupted before you convert it to a string. Probably by json_decode himself.
I did my credits script callback to die when he finds "user ID" my log file is now full of errors. Fortunately it dies bashlv first only one person lost credits so far.
So I guess I manually grab it out of a JSON encoded string and make it. Messy. I'm surprised that I'm the only person with this problem.
FLindblomMemberFrom: SwedenRegistered: 2008-02-26 Posts: 278websiteThis might help someone else who runs into this problem, you can change the parse_signed_request function in the code example:
Ugly, but it works. Parse_signed_request () modified now returns an array, so you must do this:
FritzingtonNew Memberregistered: 2011-02-22 Posts: 5PHP development version now supports an optional parameter to json_decode, JSON_BIGINT_AS_STRING, fixes this.
Http://php.net/manual/en/function.json-decode.php
Is that Facebook send uids are ints and strings is not the way I believe Twitter.
Last edited by Fritzington (2011-02-22 08: 30: 58)PitstopbossNew Memberregistered: 2011-05-17 Posts: 6Hello
This seems a little people that now ... I bump it so more people are aware of the workaround (until someone from Facebook receives these storage ints as strings)
I was pulling my hair out every day with one!