Posts tagged with facebook-graph-api

I'm making a following API call to facebook graph API to fetch user groups but it returns empty data array.

In the docs: https://developers.facebook.com/docs/graph-api/reference/user/groups/ I found out that:

As of April 4, 2018, this edge returns empty data sets for GET operations unless the calling app has gone through App Review. This applies to GET operations using /me/groups as well. Please see the Groups API section of the Breaking Changes changelog for more information.

I just started developing new app, so there is nothing to review yet. Is there a way to call this endpoint without app review process?

calling this endpoint:

curl -i -X GET \  "https://graph.facebook.com/v20.0/me/groups?access_token=EAAP..." 

returns empty data:

{   "data": [   ] } 

I'm new to development with Instagram APIs and am trying to make a React based application that uses Instagram's graph API in order to fetch posts where my professional account is mentioned and display them on my webpage. I tried going through the Meta documentation on how to use their graph API, but I don't quite get where to start and I am getting confused with all the steps I need to take to just make my first API call. The Meta guide is https://developers.facebook.com/docs/instagram-api/getting-started . Any help regarding this on the steps or links to resources that can guide me through this would be great! Thanks in advance!

I have tried making a react application, but in one of the steps it says to create a facebook login app on my meta dashboard first, I did do that, but I am not getting access to the required permission, instgram_basic, etc.

how can i retrive the billing invoices (payment activities) from my business manager account via PHP SDK of Facebook Business or via Graph API? I would like duplicate the content that i see in page as https://business.facebook.com/billing_hub/payment_activity?asset_id=0000000000&business_id=000000000000&placement=ads_manager&date=00000000_00000000

payment activities on business manager

I have my business account id, my customer adv account id but when i try to retrive che invoices i get the empty response, without any error, but only an empty data. I am sure that the account has many invoices and payment activities.

I have tried both approaches yet

test via API

test via SDK

When I am trying to update the targeting of an AdSet, an error is returned. Session URL : https://developers.facebook.com/tools/explorer/321102689698722/?session_id=1408717453113278

{ "error": { "message": "Invalid parameter", "type": "OAuthException", "code": 100, "error_subcode": 3858082, "is_transient": false, "error_user_title": "Creative Must Provide enroll_status for Standard Enhancements", "error_user_msg": "This creative is eligible for Standard Enhancements, but enroll_status was not provided. Please choose whether you want to turn on standard enhancements or not. Learn more here: https://fburl.com/hyth50xo", "fbtrace_id": "AEIUzfYUlrFTKB8KAgPcVoz" } } 

But the enroll_status for Standard Enhancements is set in as OPT_IN for all the creatives inside the AdSet. Session URL : https://developers.facebook.com/tools/explorer/321102689698722/?session_id=425543010193929

[ { "degrees_of_freedom_spec": { "creative_features_spec": { "standard_enhancements": { "enroll_status": "OPT_IN" } } }, "id": "120208488275990030" } ] 

It's not an advantage+ ad. It's happening for most of the objectives.

I am using Facebook graph API Facebook graph API, to update my Instagram page's post create/ update. the endpoint I am using is like

https://graph.facebook.com/{media_id}?caption={new_caption}&access_token={access_token} 

Neither using insomnia nor using JAVA code do I receive the successful message, and the caption remains unchanged.

    private static CompletableFuture<PostFB> updatePostInstagramMessageAsync(String hostname, PostFB ig, HttpClient client) {     JSONObject jsonPayload = new JSONObject();     if (ig.text != null && !ig.text.isEmpty()) {         jsonPayload.put("caption", ig.text);           jsonPayload.put("comment_enabled", true);           System.out.println("jsonPayload is " + jsonPayload.toString());         String url = "https://graph.facebook.com/v19.0/" + "my postID";         HttpRequest request = HttpRequest.newBuilder()                 .uri(URI.create(url + "?access_token=" + ig.page_access_token))                 .header("Content-Type", "application/json")                 .method("POST", BodyPublishers.ofString(jsonPayload.toString(), StandardCharsets.UTF_8))                 .build();         return client.sendAsync(request, HttpResponse.BodyHandlers.ofString())                 .thenApply(response -> {                     System.out.println("Response for updating post is " + response.body());                     if (response.statusCode() == 200) {                                                       System.out.println("Updated post successfully.");                         } else {                             System.out.println("Failed to update post: " + response.body());                                                     }                     } else {                         System.out.println("Failed to update post. Status code: " + response.statusCode());                                             }                     return ig;                 })                 .exceptionally(ex -> {                     ex.printStackTrace();                                         return ig;                 });     } else {         return CompletableFuture.completedFuture(null);     } } 

Despite receiving a successful response, the caption does not change. I have created the application and assigned the necessary permissions:

  • pages_show_list,
  • instagram_basic,
  • instagram_manage_comments,
  • instagram_manage_insights,
  • instagram_content_publish,
  • instagram_manage_messages,
  • pages_read_engagement,
  • instagram_manage_events,
  • public_profile

I am able to create new posts but I cannot modify them. Why? any help would be appriciated.