Questions tagged [restfb]
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).
391
questions
0
votes
0
answers
10
views
How do i search for type in restfb java?
i have been trying to figure out how to use https://graph.facebook.com/search?type=adinterest&q=[%22coffee%22]&limit=10000&locale=en_US&access_token=%token_here% in restfb and i just ...
0
votes
1
answer
23
views
Interacting with Instagram accounts directly via FB graph API
I'm trying to create an endpoint that can independently determine the total number Instagram accounts associated with a Meta login and page through the results independently of Facebook pages.
...
0
votes
0
answers
64
views
How to login in Facebook using mvn project with java
I have to create a mvn java application, which must give the possibility to log on facebook and returning the user id and the user access token. i've already read the facebook guide but the code to ...
0
votes
0
answers
29
views
How to include an authentication code in restfb api calls
I am using restfb to simplify my FB login workflow. Here is my code:
String apiKey = crsProperties.getProperty("facebookAppId");
String apiServerProtocol = crsProperties....
0
votes
0
answers
42
views
RestFB: how to use DebugHeaderInfo
I'm trying to get data from the actual call to FBs from RestFB in order to manage rate limitations, and I'm using DebugHeaderInfo. The problem is that it never contains any data.
I'm reading in the ...
0
votes
0
answers
33
views
posting to / reading from facebook page on behalf off server side facebook app (java & restfb)
My app has three parts
'A'- A facebook page where automatic posts will be performed by application 'B', so, those posts won't be on behalf of end users but on behalf of app 'B' itself.
'B'- A server ...
0
votes
1
answer
29
views
Read page messages
Im aware, that read_mailbox permission was removed in FB API>2.4. I need access to page related messages. So i have a page and someone is sending private message on this page (not directly to the ...
0
votes
0
answers
33
views
How to get Batch Status from Facebook API using RestFB
I'm using RestFB api to comunicate with Facebook API.
After I send batch requests, I need to GET check_batch_request_status to know the status of all my requests.
Using Postman I did it, but using ...
0
votes
0
answers
42
views
How can I identify the bug in my Java restfb call to post to my personal Facebook feed?
I am trying to complete a personal project where I run a Java app to get covid19 data from a state's website API, then posts the daily case count to my Facebook feed.
Part 1 was to figure out the ...
1
vote
1
answer
99
views
RestFB how to subscribe to webook
I'm trying to replicate the following request (which I elaborated with the Facebook graph explorer)
POST /{page_id}/subscribed_apps?subscribed_fields=feed,mention
with it's accompanying page access ...
0
votes
1
answer
79
views
I want to read how many people have seen my post in my facebook page using restfb in java
Using the like below I was able to read how many reactions (in detailed) my posts in my Facebook page have received.
https://restfb.com/cookbook/
Now I need to read how many people have seen the posts ...
0
votes
0
answers
304
views
Getting OAuthException through Facebook Graph API for some pages of the user's feed
I am trying to get user's posts for the last 2 years using the valid token and the following link:
me/feed?fields=id,created_time,from,icon,is_hidden,message,message_tags,parent_id,permalink_url,...
1
vote
2
answers
230
views
is it possible to get page reviews and reviewer's name and profile photo url with restFB library?
I have found restFB client library in spring for facebook graph api , i have to get page reviews and reviwers name and profile photo. I am searching for this in https://restfb.com/javadoc-3/com/restfb/...
1
vote
0
answers
2k
views
Facebook restFB : Unsupported get request. Object with ID 'me' does not exist, cannot be loaded due to missing permissions
My facebook app is approved and has publish_pages, manage_pages permissions approved.
Everything worked fine till yesterday. I am seeing the below exception on the following line
Connection myPages = ...
0
votes
0
answers
14
views
DownloadData comes in which package of restfb?
I got some task regarding restfb and I am totally new to this subject.
I took one of the samples from search forums but there is no package given for DownloadData. I searched but couldn't find it.
...
0
votes
1
answer
49
views
How can I shorten timeout times using restfb request?
I am using FacebookClient class and publish function when requesting. I want to shorten timeout times. How can I do it?
0
votes
1
answer
336
views
What's the correct way to obtain a page access token with restfb?
From my application I need to post images in a photo album of a Facebook Page.
Following resfb docs I'm implementing the OAuth flow. In particular I created the login url this way:
FacebookClient ...
0
votes
0
answers
71
views
Restfb - Why when I fetch my admined groups the app throws OAuthException: (#200) Permissions error (code 200, subcode null)
I'm programming in Java and I'm trying to fetch all the Facebook groups which I am the admin.
Thus, I've created an app called "Secrets" in Facebook Graph API Explorer and
checked all the ...
0
votes
1
answer
686
views
how to add restfb. jar to maven project on Apache NetBeans IDE 11.1? No libraries category in Project - >properties
I have a project in which i use Apache Netbeans IDE 11.1 and I want to use Facebook API by adding "restFB.jar" to my project
in previous versions of NetBeans, there was "Libraries" category in ...
0
votes
1
answer
344
views
Is there any way to get feeds from public facebook pages using spring social, restfb, etc
I am trying to get feeds of public facebook pages in my java application. I am using graph api.
I keep getting an error. Error listed below.
I have generated the access token several times.
...
0
votes
2
answers
217
views
Receive Userobject but every entry is null (facebook restfb)
I'm building a form and want to fetch fields like "first_name" and "last_name" by e.g. facebook or google data but only receive an object with every entry is "null"
I've tryed go add a custom ...
0
votes
1
answer
56
views
How to post Video with custom thumbnail picture using RestFB?
I can publish video with description using RestFB. I want to add thumbnail picture to video. How can I do that?
I tried to add some Parameter when publish as
Parameter.with("thumb", BinaryAttachment....
0
votes
1
answer
401
views
How to publish to Instagram with RestFB in Java?
I'm trying to do a simple app that can publish photos to my business Instagram page. I've been looking around on the internet and I couldn't find a way to publish on it. The Business Account in ...
-1
votes
1
answer
82
views
How do I retrieve video custom labels through the RestFB API using Java?
I'm creating a java application that pulls data from facebook videos using RestFB. How can I retrieve the custom labels from each video?
Although I'm able to pull the normal data from each video, ...
-1
votes
1
answer
380
views
Not able to post in my facebook wall using java
I am trying to post a message on my facebook wall using Java. I have marked all the permissions. But I am getting the exception "FacebookOAuthException". Kindly help in resolving this. Thanks in ...
0
votes
1
answer
38
views
How to retrieve user ids of all users of a fb graph application?
I cannot find a method in restfb to find all the userids of the users who have connected to my facebook application. I am using fbgraphapi version 3.2
I have tried an old method, friends.getAppUsers, ...
0
votes
0
answers
530
views
Get Instagram emails through Facebook graph API
I have an application, that obtains user's Facebook access token with instagram_basic permission and gets information about the user's Facebook and Instagram pages.
I am able to get Instagram ...
0
votes
1
answer
124
views
Comment Count API Facebook Restfb Java
I've been programming a lot with restfb, but I'm not able to do a counting of comments, only the comments without the answers, the image can better illustrate.enter image description here
Example ...
0
votes
1
answer
82
views
RestFB Batch Request Parameters not accounted
I am using RESTFB for my facebook desktop client. I have this piece of code.
for (String page : pageIds) {
requests.add(new BatchRequest.BatchRequestBuilder((page + "/feed")).body(...
-1
votes
1
answer
117
views
Get all photos from posts on a Page
I have the necessary permissions from facebook. I am using RESTFB, I see the methods getFullPicture and getPicture in Post.class but unable to make anything out of it. How to get all the photos from a ...
1
vote
0
answers
373
views
How do I get monetization insights for my page with Facebook API using java?
For some reason i get the error:
"Received Facebook error response of type OAuthException: (#200) Monetization metrics are only visible for Page admins with access to monetization insights. (code 200,...
1
vote
1
answer
656
views
How to access Data from posts in FB pages
I have a requirement of getting data, to be specific, images from posts on those public pages in FB. I registered an app on Facebook and tried to access the page data it says:
To use 'Page Public ...
0
votes
0
answers
279
views
How do I access 'me/accounts' access tokens through java using restfb?
I'm trying to access the details of the Facebook pages I'm an admin on through restfb. I can get my user details but when I try to get the details from 'me/accounts' it just returns null.
I've tried ...
0
votes
1
answer
642
views
RestFB: Getting list of users who liked a post
I need to get the name of each like on each post on a group page. Since I first have to get some data from the original post, I'm trying to make a connection then iterate through the likes and get a ...
-1
votes
2
answers
510
views
How do i use RestFB IgUser getBusinessDiscovery()?
In the FB Graph API explorer the call to get business_discovery data uses the Instagram id for any user (in this case my own account) and uses a "username" to indicate the 3rd-party account from which ...
0
votes
1
answer
199
views
Login in Facebook using restfb API (Java)
public void login() {
String domain = "https://www.iscte.pt/";
String appId = "27298787851280";
String authUrl = "https://graph.facebook.com/oauth/authorize?type=user_agent&client_id="+...
1
vote
1
answer
1k
views
RestFB instagram integration
Does anyone has some experience with this?
I was trying to find some tutorial for basic operations at least, I found only RestFb java docs, which is not very descriptive.
What I need: getting ...
1
vote
1
answer
91
views
RestFB - How to verify Application Id from received User Access Token
In RestFB, after getting Facebook Client Object through User access token
FacebookClient facebookClient = new DefaultFacebookClient(accessToken, VERSION_2_12);
How to verify the application Id for ...
0
votes
0
answers
125
views
Obtain Facebook Events using restfb
I need to obtain all public events from my fb page.
It's not possible using an App access token anymore: "Requires a valid Page or User access token with basic permissions." - https://developers....
0
votes
0
answers
216
views
Upload video to Facebook page with Graph API - RestFB
I've been trying to upload a video to my FB page using the Graph API through RestFB Java library. I am having an issue with the access token when accessing it through the Graph API explorer. To ...
0
votes
1
answer
28
views
Facebook Api null exception
I'm trying to get like data or comment data but the .getData() always
return null and i don't know why
My code:
@SuppressWarnings("deprecation")
FacebookClient fClient = new ...
0
votes
1
answer
71
views
RestFB getting Conversations
Iam using restfb to get in touch with Facebook from our application.
I have link to the conversation
https://www.facebook.com/prasannapatireddy/posts/234992897106899?comment_id=263969987542523
Now ...
0
votes
0
answers
141
views
Before May 1st, I could use the RestFB upload video, but now how I could upload video use by RestFB 2.8.0?
1, get authorizeURL
FacebookClient client = new DefaultFacebookClient(Version.LATEST);
ScopeBuilder scope = new ScopeBuilder();
scope.addPermission(FacebookPermissions....
3
votes
2
answers
2k
views
Facebook error subcode 1870034
I have a automated job to publish some data to facebook through API, it was working fine until recently it started throwing error
com.restfb.exception.FacebookOAuthException: Received Facebook error ...
0
votes
2
answers
109
views
Resfb OAUTH Token Never expires
What kind of permission do I need for the application that can read posts and comments from Facebook public pages.
I don't have a web or Mobile Application.
I want to run the code from my PC using ...
0
votes
1
answer
65
views
RestFB - I can only get 5 friends from friend list
This is my code:
Connection<User> myFriends = fb.fetchConnection("me/friends", User.class);
myFriends.getData(); //List size just = 5
myFriends.getTotalCount(); // this method return 52 (I ...
1
vote
0
answers
98
views
android - Get facebook page post without user login
I'm trying to create an android app that shows the facebook public page post. I tried to use facebook android sdk and it seems that the app needs to be review but my app does'nt need to login the user,...
0
votes
1
answer
153
views
Facebook API using Java - NullPointerException error [duplicate]
I am working with Facebook API using the restfb library of Java. I wrote a code to get a user's timeline posts but I am keep getting the java.lang.NullPointerException error.
import com.restfb....
-1
votes
1
answer
823
views
Facebook restFB not working anymore?
I had downloaded restFB 2.0.0 for java it was working fine before Facebook scandal. Basically I had to retrieve some traffic information from a page. It was working fine last month but not I'm having ...
0
votes
1
answer
225
views
List groups with RestFB
I have this code:
FacebookClient client = new DefaultFacebookClient(accessToken, Version.LATEST);
Connection<Group> group = client.fetchConnection("me/groups", Group....