Facebook creating event start_time format issue - facebook

I am using FB API for creating events and I have problem with timeformat of start_time. When I use this format:
2013-05-04T09:00:00+0200
witch is relevant to my timezone I am getting back error code 100 about Invalid parameter.
I've tested that a little bit so I know that problem is in "+". When I use this api same way but for any time with "-" (2013-05-04T09:00:00-0200) it works and event is created - of course with wrong time displayed on FB page...
Any ideas? Thank you very much!

Related

An unknown error has occurred on Graph Facebook

I tried to get Data from Facebook Page with the graph of Facebook but I have a problem.
When I try to go on link like:
https://graph.facebook.com/ID-PAGE?access_token=MY_ACCESS_TOKEN
I always do this to have the Data from a Page but since today I have the error Message: "An unknown error has occurred".
Thanks for help.
EDIT:
The bug is fixed : https://developers.facebook.com/bugs/486654544831076/?search_id
Have a look at my answer at
How to get user email and birthday from Facebook API Version v2.4
You have to specify each field you want to query now with v2.4. If you want to explicitly use v2.3, you need to prepend your calls by /v2.3 like this:
/v2.3/{page_id}?access_token=MY_ACCESS_TOKEN
Seems like there's currently a bug regarding requests made with app access tokens instead of user access tokens:
https://developers.facebook.com/bugs/486654544831076/
At this moment, I pretty much figured out what is happening, and it looks like a bug in the Facebook API.
For v2.3 and lower:
The /PAGE-ID call will return an Unknown server error when you don't pass ?fields=username (for example). If you do pass the fields option, it will work. You can get it out of the docs.
For v2.4:
This will work, but you will miss a lot of data, so you'll also have to pass the fields options. But if you don't pass that, this version will give you back only the most basic of details. This is as described in the version release: https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/
So the solution for now, would be to add the ?fields= everywhere you need, or to wait for Facebook to maybe ever solve it.
(And while you're at it, you might as well upgrade to v2.4 ;-)

How to get events from a page with the new facebook graph api v2.4

Earlier, this would give back a list of events:
clubversuz/events
Now it gives back an empty array called 'data'.
Ok..they say that now you should explicitly declare the fields in a request, so I tried that too with this, but it return nothing either. The clubversuz id is used below:
8261409764/events?fields=end_time,start_time,timezone,id,name
Does anyone know how to go further?
P.S. I just started with this API and yesterday I was glad: I could get events.
Now, one day later, it has been broken by changes from fb. Is this how it's going to be with the fb API, Create something, break, repair? :)
It seems that the behaviour is still working if you explicitly provide the API version to be v2.3:
https://graph.facebook.com/v2.3/8261409764/events?access_token=
When you use v2.4 in the above call, it's not returning any events. This might actually be a bug; can you create a bug report?

Why does Facebook batch API request sometime return nulls?

I use Facebook's batch request quite a bit in my app. For the most part, it works really well, but one thing that confuses me is why does their API sometimes return nulls? If I get this "nulls" response, I can just try again moments later and it will work.
Here's an example:
URL:
https://graph.facebook.com/?access_token={access_token}
Request Body (prior to encoding):
batch=[{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"},{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"},{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"},{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"}]
Here's what Facebook sometimes returns:
[null,null,null,null]
If I make the same request a second later, I get the proper response:
[{"code":200,"headers":[...headers here...],"body":{...body here...},{"code":200,"headers":[...headers here...],"body":{...body here...},{"code":200,"headers":[...headers here...],"body":{},{"code":200,"headers":[...headers here...],"body":{...body here...}}]
The behavior is not always consistent. Most of the time I can try again and get a proper response. Occasionally I need to try 2 to 3 times. This problem happens dozens of times a day and it's been going on as long as I can remember. I checked my App diagnostics on Facebook and my App doesn't have any restrictions, there's no API throttling, and Facebook doesn't even list these under their "API Errors" report. Any idea why this happens?
It seems that this problem has corrected itself. I haven't seen this error show up for a few days now.
Bug report here:
http://developers.facebook.com/bugs/295201867209494?browse=search_4f42b29071ebc7f92807017

Facebook: Fetching status message for a particular date

I want to read my status message that was posted at a particular date, say 6 months back. Is it possible to fetch this message using the Facebook Graph APIs?
Thanks,
Saurabh
Yes, check for the since and until parameters.
http://developers.facebook.com/docs/reference/api/
until, since (a unix timestamp or any date accepted by strtotime): https://graph.facebook.com/search?until=yesterday&q=orange

Tagging a user in a wall post/update using Facebook API

I'm using stream.publish to write to the user's wall and attempted to get "# tagging" to work but with no avail.
If the user's name is Fred and his uid is 1234, I tried sending over "#Fred", "#1234", "#[1234]", "#[Fred]", etc. and couldn't get it to work. The raw string would display every time.
Can someone confirm if this is possible with the API or not? Thanks!
the correct syntax is
#[user_id:1:name]
it shows as a tag, but it doesn't trigger a notification. Anyone knows why?
Maybe you need follow this: NOTE: You cannot specify this field without also specifying a place.
You need to specify a place with the fan page ID of the location associated with the post.
moreā€¦ https://developers.facebook.com/docs/reference/api/user/#posts
reese:
#[user_id:1:name] - It will replace it with the 'name' which you have given
#[user_id:0] - This will notify the user BUT it will happen when you MANUALLY typing it in wall or comment section NOT through graph api, say for eg., if you want to notify this user #[user_id:0] so you are appending this text in message parameter of https://graph.facebook.com/feed api it won't work, I hope you understand :)