RestFB is a simple and flexible Facebook Graph API client written in Java. It supports access to the Graph API (Pages API, Business Manager API and many more) and additional access to the messenger platform (Webhooks and Send API).
Questions tagged [restfb]
389 questions
16
votes
2 answers
What are the Steps to getting a Long Lasting Token For Posting To a Facebook Fan Page from a Server
I have a Business Page in Facebook (known as a Fan Page in Facebook vernacular).
I want to post to that Page whenever a user takes a certain action on my app. I want to post as the Page itself rather than a user (i.e. from my personal account). The…

Ichorus
- 4,567
- 6
- 38
- 46
13
votes
2 answers
Posting image to facebook page
I want to post my images to my facebook page. Below is the code I tried which is from RestFB manual page. But it's showing some kind of error which is not getting understood. Also in publish("me/photos") should I pass my username instead of writing…

sooraj g
- 143
- 1
- 12
11
votes
5 answers
RestFB: Using a facebook app to get the users Access Token
This is what i have:
static AccessToken accessToken = new DefaultFacebookClient().obtainExtendedAccessToken("", "");
static FacebookClient client = new DefaultFacebookClient();
public static void main(String args[]) {
…

Bevilacqua
- 465
- 3
- 8
- 19
9
votes
4 answers
How to fetch more than 25 post messages
I'm trying to get all post messages using restfb, my code is as follows
public Connection publicSearchMessages(Date fromDate, Date toDate) {
Connection messages = publicFbClient.fetchConnection("search",
Post.class,
…

diya
- 6,938
- 9
- 39
- 55
8
votes
3 answers
Facebook: send an app invitation
How can I send an invitation to use an app with Graph API? I looked at the reference, and can't find something that fits. Any clue?

Alexis Dufrenoy
- 11,784
- 12
- 82
- 124
7
votes
1 answer
Posts that have tagged my Page don't show up with API call
I have a Facebook Page created for my service here. The name of the page is Rowz.
There are some posts on the page by users who have tagged the Page in posts on their own walls. Those posts show up on the Rowz Page timeline. In the Graph API for…

Sagar V
- 1,916
- 15
- 23
6
votes
3 answers
Facebook app blocked for posting too fast. What are the limits?
We (a local hackerspace) have a Tumblr blog and wanted to make ourselves a Facebook page. Before going live we wanted to import all our Tumblr content to Facebook so our fans on Facebook can browse it here as well. For this I have made an app that…

Rokas
- 61
- 1
- 1
- 5
6
votes
4 answers
Facebook emails always return null through FQL and RestFB
I'm trying to convert friend pages into fan pages (most businesses have created friend pages by mistake) and am trying to email everyone on a friend list about the move.
I've tried
FQL "SELECT email FROM user WHERE uid=xxxx"
Creating groups (not…

mabeloo52
- 63
- 1
- 4
5
votes
1 answer
RestFB doesn't fetch posts from certain account for certain keywords?
We are trying to fetch posts which have 2 keywords (e.g. Chicago Sports) via the RestFB query interface.
Its able to fetch posts from a certain account, but for some weird reason it skips the messages from a different account even though both of the…
user899876
5
votes
3 answers
How to set Facebook album privacy with Graph API?
I would like to know if it's possible to set the privacy setting for a specific Facebook album with RestFB Java library ?
Thank you very much,
Regards,
Anthony

Anthony
- 71
- 1
- 2
- 4
5
votes
1 answer
restFB post as page step by step working example
I am at my wits end, I cannot seem to post a message as the page, I can post as the admin user to the facebook page but not to the page as the owner itself.
My code is as follows:
String MY_APP_ID = "xxxx";
String MY_APP_SECRET =…

iggyweb
- 2,373
- 12
- 47
- 77
4
votes
1 answer
How can i retrieve facebook auth code using restfb
I am creating a java application with RestFB.
At this url, Facebook explains how to authenticate using facebook connect.
Basically, the steps are the following:
Redirect to facebook as the example.…
user899876
4
votes
0 answers
how to authenticate desktop application using java and restfb api
I am using restfb api and Java language. But my main concern is that how i authenticate my user, i mean how to take them to the login window and take the access token from the browser window.

Prashant Yadav
- 59
- 7
4
votes
2 answers
Does facebook API allow searches on profile, networks, employer, school info in the account?
Does facebook API allow searches on profile, networks, employer, school info in the account?

diya
- 6,938
- 9
- 39
- 55
4
votes
1 answer
Facebook: post a photo on a friend's wall
I'm trying to post a photo on the wall of a friend using RestFB, a Java API for Facebook. I tried various solutions like:
facebookClient.publish(fbu+"/photos/",FacebookType.class,new FileInputStream(pathOrig));
fbu is the Facebook user id of the…

Alexis Dufrenoy
- 11,784
- 12
- 82
- 124