Posts under category facebook-graph-api

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.

I have created a whatsapp app with catalog integration. When a user places an order the product details are fetched using

url = f"https://graph.facebook.com/v19.0/{product_catalog_id}/products" params = {     "fields": '["category","name","description"]',     'filter': f'{{"retailer_id": {{"i_contains": "{retailer_id}"}}}}',     "summary": "false",     "access_token": access_token } 

It works when I am running it using ngrok, but when I use aapanel, for some reason, this same script returns null there. I have tried hardcoding the value of product_catalog_id to test if thats the issue. But nothing works, and its also not throwing any error. What could be the reason? Am I lacking any permissions?

I am trying out the Instagram Graph API for the first time to get the user page ID, aiming to retrieve the Instagram business account ID. However, when I use the Graph tool for my app and enter me/accounts, it returns nothing. I read that me/accounts should return various data, including what I need, but it comes up empty despite fetching the access token properly.

I've had trouble finding updated documentation on the correct permissions needed for me/accounts. Some permissions don't seem to be available anymore. I've tried many permissions, but nothing works. Currently, I have the following permissions: pages_show_list, instagram_basic, instagram_manage_comments, instagram_manage_insights, pages_read_engagement, pages_manage_metadata, and pages_read_user_content. I also have a business Instagram account linked to my Facebook account.

Any advice on how to sort it?

I tried using graph apis and even in meta explore tools as well, but getting data as empty string on fteching me/accounts. I had linked instagram and facebook page and even turned instagram account into business account. Expecting to get all the accounts linked, so that i can use id for content publishing.