How to handle the big int facebook uid returned by FQL?

前端 未结 3 981
执念已碎
执念已碎 2020-12-29 00:54

I\'ve a problem in handling the big userid\'s of facebook and properly storing them into my database..

As the fql.query REST api is going to be deprecated ,I\'m usin

3条回答
  •  不思量自难忘°
    2020-12-29 01:17

    There are two things very consistent about Facebook. They are: 1) changing their APIs at their whim without any headsup. 2) Inconsistency between graph and fql objects.

    As you have indicated, the unquoted values returned from Facebook are always long's (aka big int, aka Int64). And the quoted values are string representations of the long value.

    What it appears to me is that the $facebook->api call is munging the longs into floats. I'd suggest logging it as a bug with the $facebook->api team.

    In the interim while they fix that bug, you can code your own code to do the HTTP post to the graph and parse the returned results. I don't encounter this issue with the C# API, nor with the Javascript API.

提交回复
热议问题