Question

I can't find a way how to remove open or close hours from Facebook page using Facebook API. I have page that looks like this:

{ 
  ...
  "id": "123456", 
  "category": "Business services",       
  "hours": { "mon_1_open": "15:00", "mon_1_close": "18:00" }
}

If I post this FB OpenGraph data:

{ "hours": {"tue_1_open": "15:00", "tue_1_close": "18:00"} } 

FB updates page hours and now page hours looks like this:

{ 
  ...
  "hours": { 
    "mon_1_open": "15:00", "mon_1_close": "18:00", 
    "tue_1_open": "15:00", "tue_1_close": "18:00"
  }
} 

The problem is that I cant find a way how to remove "mon_1_open" at all. I tried to update mon_1_open with values 0, false, null, but facebook api converts this to "00:00". How to make FB API remove mon_1_open field?

Thanks for your help

Was it helpful?

Solution

You should send string 'none', like this:

{ 
  ...
  "hours": { 
    "mon_1_open": "none", "mon_1_close": "none", 
    "tue_1_open": "15:00", "tue_1_close": "18:00"
  }
} 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top