Posts tagged with facebook-graph-api

Currently, i'm testing Facebook Graph API for creating Campaigns, Adsets, Ad creative and ads. I have create an Sandbox ad account, assign it to a page and get its token for those API.

For Campaigns & Adsets, it works perfectly. But till the Ad creative part, my token was not eligible to do it.

After research, i figured out that when i assigned a page, my token only have permission as ADVERTISER, which only allows to create ads but not ad creative. In order to create ad creative, i need to have CREATE_CONTENT permission.

But the thing is, in my Business Manager, i can't added more tasks since this is an sandbox ad account and it doesn't have an official email to verify.

Have anyone suffered the same issue and figure out how to work around to add more page's tasks to an sandbox ad account owner

I have created a short term token to grab instagram business account data from https://developers.facebook.com/tools/explorer/ with following permissions

pages_show_list business_management instagram_basic pages_read_engagement pages_read_user_content 

and then i extend the short term token to longterm from https://developers.facebook.com/tools/debug/accesstoken/?access_token=SHORT_TERM_TOKEN=v21.0

But when i request instagram for grabbing media

curl -X GET "https://graph.instagram.com/me/media?fields=id,caption,children,permalink,media_type,media_url,username,thumbnail_url,timestamp&access_token=LONG_TERM_ACCESS_TOKEN" 

It throws error

"Sorry, this content isn't available right now"

What am i missing?

I am sending a GET request to retrieve an overview of my user conversations, following this documentation.

curl -i -X GET "https://graph.instagram.com/v21.0/$APP_SCOPED_USER_ID/conversations?platform=instagram&access_token=$LONG_ACCESS_TOKEN"                                                                     

Using the Acces Token debugger I have verified that my long-acccess token has the appropriate permissions:

instagram_business_basic, instagram_business_manage_messages, instagram_business_content_publish, instagram_business_manage_comments 

It returns an empty list, even though I have conversations on the Instagram account:

 {"data":[]} 

It return reponse status 200, so I think the request is OK but I don't understand why the list of converstations is empty.

Complete output:

HTTP/2 200  etag: "1050253aec7b29caff644806927dabfa81406eee" content-type: application/json; charset=UTF-8 vary: Origin vary: Accept-Encoding cross-origin-resource-policy: cross-origin x-app-usage: {"call_volume":0,"cpu_time":0} instagram-api-version: v21.0 access-control-allow-origin: * strict-transport-security: max-age=31536000; preload; includeSubDomains pragma: no-cache cache-control: private, no-cache, no-store, must-revalidate expires: Sat, 01 Jan 2000 00:00:00 GMT x-fb-request-id: AJDy8jjnwzoXsbaD81SmtVR x-fb-trace-id: HY/Hc9Ie7Gw x-fb-rev: 1018763301 x-stack: www x-fb-debug: mX0wWU1Pk1etujdU1lsm1/gKHjgAlzKPS2B3sLbBjFtu8xUO0z6NOVizj5u+27ULdvNP5NvardPAZMvOULGr5g== content-length: 11 date: Tue, 10 Dec 2024 19:35:31 GMT x-fb-connection-quality: EXCELLENT; q=0.9, rtt=28, rtx=0, c=16, mss=1380, tbw=3420, tp=-1, tpl=-1, uplat=1367, ullat=0 alt-svc: h3=":443"; ma=86400 {"data":[]}g 

I am using com.facebook.android:facebook-android-sdk:16.0.1 in android app. This is usede to fetch user friend list and send gifts or coins to there friends who are using our app.

strengly it suddenly stopped working from last two days

Has anyone had this issue and what the reason could be?

It used to work fine and could return everything, but from last 2 days something seems to have changed.

URL formed when clicked is https://m.facebook.com/v16.0/dialog/apprequests?app_id=placeholder&data=& display=touch&frictionless=1& get_frictionless_recipients=1&message=You%20got%20Magic%20Portion%20from%20your%20friend&object_id=&redirect_uri=placeholder&suggestions=&title=Magic%20Portions&to=placeholder

and attaching the image too

I am currently working with the Meta Business Manager and the Facebook Graph API. In the Meta Business Manager UI, under Business Info, I can see a field labeled Ad account creation limit, which shows the maximum number of ad accounts that can be created for a particular business.

However, I am unable to find any relevant endpoint or field in the Facebook Graph API documentation that would allow me to fetch this information programmatically. I have searched through the available endpoints for businesses and ad accounts but haven’t found anything that matches.

Does anyone know if it's possible to retrieve the Ad account creation limit via the Facebook Graph API? If so, could you point me to the correct endpoint or provide an example of how to fetch this data?