Is it possible to schedule facebook post with RESTfb java api? - facebook

As in title. I would like to schedule post for my facebook page with restfb api. Is it possible?

You have to add the scheduled_publish_time parameter while sending the request. The parameter is a unix timestamp and should be between 10 minutes to 6 months from the publish time.
You may change the schedule time by updating the post afterwards.

Related

is it possible to read group feed by using facebook group api? (after 4 april chage)

Is it possible after the changes of 4 April, to use Facebook group API in order to read the feed?
Until 4 April i did it via Graph API EXPLORER by using GET request like:
v2.12/{Group-id}/feed
using user access token.
This is not working for me anymore.
The service is no longer available or I do something wrong?
https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes
Testing of our more robust process starts today and the new process
should resume in a few weeks, but apps currently accessing Events and
Groups APIs will lose access today.
The feed will just not return some fields anymore, you can read more about it in the changelog: https://developers.facebook.com/docs/graph-api/changelog/breaking-changes#groups-4-4

Get page's messages from a certain date range - Facebook Opengraph API

I'm trying to get the messages in a convertation, sent to a Facebook page, from a certain date, via the OpenGraph API.
for that, Im using the parameters "since" and "until".
{conversation_id}/messages?fields=message,from,created_time,shares,tags,attachments&since=4/12/2017 04:00:09 PM&until=4/12/2017 04:18:36 PM
Example from Facebook Graph Explorer
this should return only the messages between these dates in the conversation,
and used to work both in my code and in the Facebook Graph Explorer.
but recently i noticed that i get all the messages since the beginning of the conversation.
my code uses graph version 2.6, but i tested it on Graph Explorer in other versions as well, all the results are the same.
was there any change in the API that prevents this ability?
For anyone who come across this question who might want to know:
this issue was raised to Facebook as a bug, and their team accept it as a valid bug:
https://developers.facebook.com/bugs/420363721670492/
hopefully it will be solved soon

Facebook API Insight Metrics Daily graph API

Hi Guys I am hoping someone could help me.
I have been toying around with the Facebook API for our company's facebook analytics page. I am looking to get information on the likes, shares, impressions etc and store directly to a database
I have been able to pull this information back using the Graph API Explorer. Now I want to be able to pull the information back for say today. When I add today's date in it only relates to the actual posts that were posted today, not today's activity. if that makes sense.
An example of this is if I had liked a post today that was created 2 days ago, it doesnt show in in today's activity, but the activity from 2 days ago.
The code I have been using is:
feed?fields=comments.limit(1).summary(true),likes.limit(1).summary(true)&since=2016-10-28
Just wondering if I am missing something as surely should be an easy way of getting todays actual activity from users?
Your example isn't fetching Insights, you're fetching the posts visible on the page's Timeline, then asking for a count of the comments and likes
There's a totally different API for fetching Insights data: https://developers.facebook.com/docs/platforminsights/page
This is the same API used by the Insights UI, so for the same set of metrics/dates, it should give identical results to the UI

How to read Facebook post based on updated time using API

How to read Facebook comments based on updated time through API?
I tried "since" and "until" but both are reading the data based on created time.
for example let us assume a user created a post on his timeline two days back and someone commented on the post today. If I try to read the comment done on today using the following query /me/feed?since=2014-09-08 it doesn't return anything because the created date is two days back.
There's unfortunately no way to query the Graph API concerning the upate timestamp IMHO. since and until reference the created_time, as you said.
If you have a Graph API v2.0 app, you could theoretically use FQL to query by comment creation timestamp. Have a look at the comment table at https://developers.facebook.com/docs/reference/fql/comment/ and the field time. I guess you'd have to in conjunction with the stream table to get the post_is list.
To be able to use FQL you'll need an app which is an Graph API v2.0 app. And FQL will only work until April 30th 2016.

Year In Review - Facebook Graph / FQL

Is it possible to get all of the info used by FB in Year In Review (for a specific year) - all at once? Rather than merging by calling various Graph API calls and filter accordingly. Is there a direct way to get complete Year In review of any friend of mine?
Eg:
/me/yearInReview/2012/friendID ?
As stated by Igy, there was never documentation anywhere that stated this was an API call. This is not possible