Posts under category Facebook Graph API

i got the access token but while exhangeing it for long live token api getting following error

error: { message: 'Unsupported request - method type: get', type: 'IGApiException', code: 100, fbtrace_id: 'AnMYrIXYSTKYCA_Sh2qKxkU' }

const accessTokenApi = {             url: 'https://api.instagram.com/oauth/access_token',             method: 'post',             headers: {                 'Content-Type': 'application/x-www-form-urlencoded'             },             body: new URLSearchParams({                 code: code,                 redirect_uri: instagramConfig.callbackUrl,                 client_id: instagramConfig.clientId,                 client_secret: instagramConfig.clientSecret,                 grant_type: 'authorization_code',             }).toString(),         };         const tokenResponse = await this.apiCall(accessTokenApi); const userPlatform = await this.userPlatformService.getUserPlatfromsByCode(userId, "INSTAGRAM");         const userLongLiveTokenApi = {             url:`https://graph.instagram.com/access_token?grant_type=ig_exchange_token&client_secret=${instagramConfig.clientSecret}&access_token=${userPlatform.authToken}`,             method: 'get',             headers:{}         }         console.log(userLongLiveTokenApi)         const userLongLiveTokenResponse = await this.apiCall(userLongLiveTokenApi); 

I am trying to retrieve a list of all pages (business and non-business) that the account has. However, only non-business pages are currently being returned.

First I allow the user to login. He/she gets a Facebook Login popup, where he/she can select the pages. Then I generate a long-lived token, like so:

const response = await axios.get(   "https://graph.facebook.com/v21.0/oauth/access_token",   {     params: {       grant_type: "fb_exchange_token",       client_id: process.env.FB_APP_ID,       client_secret: process.env.FB_APP_SECRET,       fb_exchange_token: fbAccessToken,     },   } ); 

I get a token just fine. I return the token and the client makes an api call to retrieve the pages:

const handleFacebookCallback = async (response: any) => {   if (!response?.id) {     return;   }   setLoading(true);   const { data } = await api.post("/api/integrations/facebook/user", {     userId: user._id,     fbAccessToken: response.accessToken,     fbUserId: response.id,   });   const url = `https://graph.facebook.com/v21.0/${response.id}/accounts?access_token=${data.longLivedToken}`;   const fbResponse = await fetch(url);   const fbData = await fbResponse.json();   setResponseFbPages(fbData.data);   setLoading(false); }; 

Now, I have 3 pages - 2 are business and 1 non-business. Only the non-business pages are getting returned.

I tried to query the /accounts endpoint, and I am expecting to get a full list of pages returned.

In threads documentation: https://developers.facebook.com/docs/threads/posts

They gives the details of Threads Graph API to post content on Threads platform. Here:

They don't mention that how we can get our threads-user-id. Please tell me how I can get that.

I already search on Facebook developer account and they don't mention any type of thread-user-id their.

I used my threads account username but it didn't work for me as well.

I am using the Facebook Video API to publish reels to a facebook page. I can sucessfully publish the reel to my page, but it is not visible to anyone else, meaning it is probably private.

I couldn't find any settign or parameter in the API to make the video public

I assume the issue is with permissions? I am using page access tokens for each page, and these are the permissions set for the app:

read_insights publish_video pages_show_list business_management instagram_basic instagram_manage_comments instagram_manage_insights instagram_content_publish instagram_manage_messages pages_read_engagement pages_manage_metadata pages_read_user_content pages_manage_posts pages_manage_engagement

I hope someone knows what the issue is

I saw that there is another permission: public_profile that should be set, but I just don't see it, it's not in the list of permissions

Do I need to verify the app? (it's in development). I just don't have an actual app, I am using make.com to make api requests to facebook graph api and video api

⁠Sometimes We’re experiencing intermittent issues where some events from Meta aren’t hitting our webhook. The webhook is connected and set up in our Meta App Dashboard. Are there known issues that could cause events to sometimes fail to reach certain webhooks? Any troubleshooting advice or solutions would be appreciated.