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).

389 questions
2
votes
1 answer

Send message with restFB

I tried this is simple example in order to send message in Facebook: public void testSomeMethod() { String token = "XXXXXX"; FacebookClient facebookClient = new DefaultFacebookClient(token, Version.LATEST); …
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
2
votes
3 answers

Getting all friends from facebook using restfb

FacebookClient facebookClient = new DefaultFacebookClient(MY_ACCESS_TOKEN); Connection myFriends = facebookClient.fetchConnection("me/friends", User.class); System.out.println("Count of my friends- " + myFriends.getData().size()); I am…
anjali
  • 147
  • 13
2
votes
0 answers

RestFB API: Posting an image to my wall, with a hyper-link gives java.lang.IllegalArgumentException: Binary attachment data cannot be null

Situation: I'm trying to post an image to my own wall in Facebook. The image is to be hyper-linked to some given url (google.com for example). The code snippet is as follows (pretty standard one from the RestFB API). I'm using the latest…
Abhishek
  • 743
  • 1
  • 15
  • 28
2
votes
1 answer

Java + RestFB API: Getting fresh Page Access Token without messing with AppID, appSecret

What I want to do: I am trying to make a simple program that posts 5-10 statuses, at a time, on a page's wall. The post to the page will have to be done under the name of the page. I've read tons of badly written Facebook Developers documentation…
Dimitris Sfounis
  • 2,400
  • 4
  • 31
  • 46
2
votes
2 answers

getting null for user email - restfb

I've recently started working on manual login flow of facebook. And followed this blog to get the access token and using restfb to access user information. Below is the code snippet as mentioned - Fetching Single Objects: FacebookClient…
Mohammad Faisal
  • 5,783
  • 15
  • 70
  • 117
2
votes
1 answer

Fetching Private Messages of users on Facebook using RestFB

I am new to using Java APIs and am very confused about using RestFB to fetch user private messages from Facebook. What i have figured till now.. Connection cnv = facebookClient.fetchConnection("me/inbox", Message.class); …
user3504411
  • 51
  • 1
  • 2
  • 7
2
votes
1 answer

Facebook4J proxy configuration ignored - Graph API

I am using Facebook4J to to retrieve facebook feeds. This works perfectly when i am not using proxy but when i swtich on proxy, i expect the call to go through proxy. but the call is always going through direct internet connection. THE CALLS ARE NOT…
jack
  • 65
  • 6
2
votes
0 answers

Facebook api RestFB

is it possible to publish post with photo on facebook chronic? When i try to post photo like this: List requests = new ArrayList(1); StringBuilder names = new StringBuilder(); for (Map.Entry
Oleksandr Samsonov
  • 1,067
  • 2
  • 14
  • 29
2
votes
1 answer

Making my content looks good on Facebook wall while posting via app in Java

I am using Scribe Java API and restFB to work on facebook. Here my requirement is to post on user wall once he is registered. I wanted to show some good looking posts as here. I want to share our logo instead of that image containing (100,000)…
Vignesh Gopalakrishnan
  • 1,962
  • 9
  • 31
  • 53
2
votes
1 answer

How to install RestFB plugin in Play Framework 2

I'm using Play Framework 2.1.3 and want to use RestFB to work with Facebook Graph API but I can't get it installed properly. Here is my Build.scala val appDependencies = Seq( "com.restfb" %% "restfb" % "1.6.12" ) val main =…
duy
  • 1,890
  • 4
  • 16
  • 20
2
votes
1 answer

Post a photo on Facebook with restFB

How can i edit this code to post on my wall a photo that are for example in the directory: "C:\myfiles\myphoto.jpg"? FacebookType publishPhotoResponse = facebookClient.publish("me/photos", FacebookType.class, BinaryAttachment.with("cat.png",…
David
  • 21
  • 2
2
votes
1 answer

Using facebook RestFB API in JAVA

I'm using RestFB facebook API in JAVA. What i need to do is to get: users likes,users friends list, users friends likes. what is the right flow to do it? Do i need to build an application on facebook that the users will approve and then connect to…
user2482703
  • 151
  • 2
  • 13
2
votes
0 answers

RestFB - I publish a photo album on my facebook but my friends doesn´t see it

I made an application that publishes photo albums on my facebook account. It used to work months ago, but now the albums that the app publishes are not public. Looking my facebook, the albums have public permissions, but my friends can´t see them.…
2
votes
0 answers

OAuthException error asking for details of a payment

I am using the new version of the payments: Local currency Payments and my tests are given me different results. Sometimes everything is well, but sometimes an error appeared when I am asking to the facebook graph for more details about the…
jenaiz
  • 547
  • 2
  • 15
2
votes
3 answers

How to get FB access token given App ID and Secret?

I am just learning restfb. I registered an app on the FB site and got an app ID and Secret keys. However, as per this tutorial, I am supposed to have an access token to initialize DefaultFacebookClient. I tried to follow the instructions there…
amphibient
  • 29,770
  • 54
  • 146
  • 240