facebook-csharp-sdk/facebook-csharp-sdk — Issue #99: large long/int64 value being sent over the wire incorrectly
Author: Minimalist
Created: 2012-02-27 22:24:46+00:00
State: open

I'm building up an ad posting, which has an object_id in it. If I serialize the structure with newtonsoft's serializer, I get:

{"campaign_id":6003891916512,"name":"test","status":1,"bid_type":1,"max_bid":150,"targeting":{"countries":["FR","DE","NL"],"radius":10,"age_min":21,"age_max":35,"broad_age":0,"genders":[1,2],"education_statuses":[0],"keywords":["Instyle Magazine"]},"creative":{"body":"la la la la la. Check out and become a fan.","type":2,"object_id":10150098461530576,"name":"testy","image_hash":"ba24509710d162fcd7df6157638900f5"}}

However, If I look at what the SDK is sending over the wire when I pass in the same structure, the object_id is sent as:

"object_id":1.01500984615306E+16

So we can no longer use the SDK on newer pages that have these larger ids.