Questions tagged [facebook4j]

Facebook4J is an open-sourced, mavenized Java library. With Facebook4J, you can easily integrate your application with the Facebook API. Facebook4J is an unofficial library.

Facebook4J is an unofficial Java library for the Facebook Graph API.

Facebook4J is featuring:

59 questions
0
votes
1 answer

Facebook4j: Get feed from user excluding posts by other users

I'm trying to fetch the latest posts of a few users using a batch request: new BatchRequest(RequestMethod.GET, USERID/feed?limit=5&fields=from,created_time,message") The problem is that it does not only return posts done by this user, but also…
Thomas
  • 483
  • 7
  • 22
0
votes
0 answers

Posting status message to facebook page

Im trying to post some status message on my facebook page, not my personal facebook profile account, but on page i created separately. My current code looks like this: import facebook4j.Facebook; import facebook4j.FacebookException; import…
anotherUser
  • 551
  • 6
  • 29
0
votes
1 answer

Facebook4j: How to get the total number of likes for a facebook page?

I am trying to retrieve the total number of likes for a facebook page using facebook4j. Here is my code snippet: final Reading reading = new Reading().fields("id","about","name","likes"); Page p = facebook.getPage("green", reading); …
Arjun A J
  • 396
  • 1
  • 9
  • 34
0
votes
1 answer

Getting Facebook error response of type OAuthException

I have been using below code to get data from my facebook home using restFb api. import java.util.List; import com.restfb.Connection; import com.restfb.DefaultFacebookClient; import…
Ankit Agrahari
  • 349
  • 9
  • 22
0
votes
1 answer

Access Facebook account using facebook4j

I wrote something like this, in JavaFX. public class ShareOn { private static String appId = "", appSecret = "", accessToken=""; private static Facebook facebook = null; private static void createFbConnection() { facebook = new…
0
votes
1 answer

Facebook4J OAuth failing

I am trying to search for public items using Facebook4J, I understad I need an appId AND appSecret which I have, the app token is the these two with a pipe symbol between them (as I understand). I can not understand why I am gett an OAuthError ,…
Pete B
  • 69
  • 2
  • 13
0
votes
1 answer

How to gain OAuth user token without web login?

Is there any way I can get a OAuth user token with the user details (username, password etc?)
Haze Xi
  • 23
  • 3
0
votes
1 answer

Facebook API - call returns less fields when using access token

I have public page post id, about which I would like to get more data. When I make API call like this, https://graph.facebook.com/{POST-ID} I get back full data about the page post including comments, link, attached photo etc. However, when I try…
Liberul
  • 111
  • 3
0
votes
0 answers

Simple facebook user autherization with facebook4j

I'm studying the Facebook4j lib and got stuck on the User authentication. Basically, i want to authorize to find some user and get some data from it like "likes", about and other stuff. From the start i dont want to go servlets and ect, and to…
0
votes
0 answers

How to fetch only english comments from facebook?

I fetched the comments from facebook using facebook4j and stored in text file, but I want only English comments for further processing,ignoring Spanish , Japanese,French. I tried using regex in Java but not getting the exact regular expression for…
Niki
  • 1
0
votes
0 answers

Facbook4j: Automatically authenticate a user

What I've done so far: I wanted to add facebook support to my native Java application (Java Web Start application). To get a valid access token for a new user, I forward the user to a web page where he can do the authentication (I don't think there…
0
votes
0 answers

How to write Json pojo class in java?

I'm getting the json raw data and I'm parsing it fine in main class.But I don't have any idea how to write a pojo to get all the values from the json raw data I'm parsing.This class gets the raw json and parses the needed fields i want to write a…
Dilip Bobby
  • 323
  • 5
  • 15
0
votes
1 answer

How to get the all likes of post with out getting the pagaing in json response given by Graph api in one single json call?

I'm trying to get the all the likes of the a post by using the Graph api.I'm able to get only the 1000 likes in json response and the other likes data is in the paging obj next link.How can i break that paging to get all the post likes of the post…
Dilip Bobby
  • 323
  • 5
  • 15
0
votes
1 answer

Why is the Facebook API returning a missing post?

I'm using Facebook4J to obtain the feed of public pages. I tested it out on a public page and noticed that I received a null value for the message field of one of their posts. I checked the created time of the post and went to compare with the…
Csh
  • 103
  • 1
  • 11
0
votes
1 answer

facebook group info using url

For a public group https://www.facebook.com/groups/359484787507661/, i am getting the group info by the followong code: Group group = facebookClient.fetchObject("359484787507661", Group.class); But I cant access the group info of the following…
din_oops
  • 698
  • 1
  • 9
  • 27