Questions tagged [facebook-java-api]

The Facebook Java API represents the java SDK for the Facebook Ads API (aka Marketing API) which is used by application developers to create, manage and measure ad campaigns that run on Facebook.

87 questions
1
vote
0 answers

Asynchronous Batch Requests using Facebook Marketing API (JAVA)

is there a way to make asynchronous batch requests using java sdk? The docs show some examples using curl only. Does anyone have a java example? BatchRequest batchRequest = new BatchRequest(context); // adding some requests …
lidox
  • 1,901
  • 3
  • 21
  • 40
1
vote
0 answers

getKeywordStats() not working (Facebook API Java SDK )

I'm using the official Facebook API Java SDK to retrieve stats for each of the interests used in the targeting of a specific ad (as described in https://developers.facebook.com/docs/marketing-api/reference/ad-keyword-stats). When trying the call in…
1
vote
1 answer

Unable to implement Facebook Java APi

I need help with Facebook's marketing API. I'm trying to create an ad using Facebook Java API. I've email stored in my database, I want my program to take those email IDs and push them into custom audiences. But I am facing some problem with…
1
vote
1 answer

facebook java ads sdk how to retrieve "delivery, results,result_rate,cost_per_result", and breakdown by day

I'm trying to use facebook's java sdk to generate the ads report. I mainly followed the Sample code, using new AdAccount(ad_account_id, context).getInsights() to retrieve data. But for the java sdk I could only retrieve partially data. I'm not sure…
1
vote
1 answer

authentication Facebook ad api

I need to create a Java app that stores ad names from a business account in a DB on a daily basis. These are the steps taken: -I was added to a business on Facebook with access to their ad accounts -I registered an app on…
CCC
  • 2,642
  • 7
  • 40
  • 62
1
vote
0 answers

Sharing to social media, specifically Facebook

I've got a weird issue. I need to share different content depending on the social media that has been selected. I found something that allows me to do it, it just becomes a problem when i need to implement sharing to facebook (Facebook ignores the…
Stillie
  • 2,647
  • 6
  • 28
  • 50
1
vote
0 answers

facebook ad statistics - facebook API

how to fetch the statistics of a particular ad. I guess it actually shows the overall statistics for the whole account. is there any other way to fetch the details ?
1
vote
1 answer

Programmatically get like count of a photo from Facebook using java

I am developing an andorid app which post some photo on Facebook, at the same time I want to calculate the number of likes of that photo from my android app. For information - I am using Facebook SDK and I have successfully logged in Facebook…
mdadil2019
  • 807
  • 3
  • 12
  • 29
1
vote
2 answers

How to get facebook session key with facebook-java-api

How do I get the session key with the facebook-java-api ?# What I did so far is this : After I authorised my app to acces my facebook account I do get redirected to the right redirect url in my app and there I do FacebookJsonRestClient…
Paul Pinguin
  • 13
  • 1
  • 3
1
vote
0 answers

How to access total Amount Spent in Facebook API Java for Business accounts

I am creating an analytics page for my website. So I need to get data from facebook API. My current code is public class HelloFacebookAPI { public static final String ACCESS_TOKEN = [TOKEN]; public static final long ACCOUNT_ID =…
Emir Arditi
  • 107
  • 9
1
vote
1 answer

Renew users permission Facebook

I have a slight problem with user permissions in my Facebook login flow. I am able to ask for permissions only during first login to my App. But problem is if user logged into app remove permission for email address in his Facebook settings. I am…
1
vote
1 answer

Facebook4j access token error 2500

I would like get data from facebook with facebook4j library, but I received this error An active access token must be used to query information about the current user. code - 2500 The code: ConfigurationBuilder confBuilder = new…
Tonj83
  • 11
  • 1
1
vote
0 answers

facebook4j search public posts issue

I am using facebook4j to collect posts on a particular topic. The code runs all find and I am able to search the topics. But the result also contains the irrelevant data. Example if i search a keyword such as "messi", i am expecting the posts that…
1
vote
2 answers

Facebook4j get page likes

I am using facebook4j-core-2.1.0 and trying to get the page likes. I don't know what I am doing wrong, I am kinda newbie at this. public static void main(String[] args) throws FacebookException { // Generate facebook instance. …
pro_newbie
  • 336
  • 2
  • 6
  • 19
1
vote
1 answer

What happens if I miss facebook's callbacks?

What happens if I miss facebook's callback, because my app is down, or had an error or something? Will facebook retry later?
flybywire
  • 261,858
  • 191
  • 397
  • 503