Posts under category Meta & Facebook

When creating a Consumer app with the Facebook Login product added (not Facebook Login for Business) you get a simple, single-step dialog to login. You just press "Continue as..." and it's done.

However, you are limited to only two scopes: public_profile and email. The only way I can get additional scopes is to create a Business app and add the Facebook Login for Business product. After doing this the login dialog is completely different. It's a much more complex, multi-step dialog that requires you to choose which businesses to opt-in and other things that need to be configured/confirmed.

It would seem that requesting permissions other than public_profile,email requires a Business app with Facebook Login for Business and the more complex login dialog, but there's a service we use called Flockler that lets you connect your Facebook/Instagram account and this is their Facebook dialog:

Their app uses the Consumer login dialog, but requires all these permissions: pages_read_user_content,pages_read_engagement,pages_manage_metadata,read_insights,business_management,instagram_basic,instagram_manage_comments,instagram_manage_insights

My question is, how can they have the simple Consumer login dialog while requiring all these additional permissions, when the only two permissions available in a Consumer app are public_profile and email?

I'm trying to create a message template for whatsapp business and i keep getting an error. Following the docs, I think my implementation is correct. If buttons are not included(with dynamic content its pretty much easy on the meta dashboard, but here I'm try to use button with dynamic content which is not possible on the dashboard so I have to go the curl way but it's not working. below is my implementation(had to switch to python thinking i might get on to something)

import requests from requests.structures import CaseInsensitiveDict url = "https://graph.facebook.com/v20.0/whatsapp_busines_id/message_templates" headers = CaseInsensitiveDict() headers["Authorization"] = "Bearer YOUR_ACCESS_TOKEN" headers["Content-Type"] = "application/json" data = """ {         "name": "payment_success_property_contact",         "language": "en",         "category": "UTILITY",         "components": [           {             "type": "HEADER",             "format": "TEXT",             "text": "Payment Successful"           },           {             "type": "BODY",             "text": "Hi there! Great news! Your payment for \"{{1}}\" is successful. Please contact the owner via WhatsApp or normal call to visit and check the property. After your visit, you can confirm or cancel the payment.\n\nEnjoy your visit!",             "example": {               "body_text": [                 "Seaside Villa"               ]             }           },           {             "type": "FOOTER",             "text": "Nanohunt Software"           },           {             "type": "BUTTONS",             "buttons": [               {                 "type": "URL",                 "text": "Contact via WhatsApp",                 "url": "https://wa.me/{{2}}",                 "example": {                   "parameters": [                     {                       "type": "text",                       "text": "YOUR_PHONE_NUMBER"                     }                   ]                 }               },               {                 "type": "PHONE_NUMBER",                 "text": "Call Owner",                 "phone_number": "{{2}}",                 "example": {                   "parameters": [                     {                       "type": "text",                       "text": "YOUR_PHONE_NUMBER"                     }                   ]                 }               },               {                 "type": "URL",                 "text": "Confirm or Cancel Payment",                 "url": "{{3}}",                 "example": {                   "parameters": [                     {                       "type": "text",                       "text": "https://yourwebsite.com/transaction/TRANSACTION_ID"                     }                   ]                 }               }             ]           }         ]       } """ resp = requests.post(url, headers=headers, json=data) print(resp.json()) 

So after running it i get

mbishu@fedora:~/Desktop/nanohuntapi$ python template.py {'error': {'message': '(#100) The parameter name is required.', 'type': 'OAuthException', 'code': 100, 'fbtrace_id': 'AywCoC2brI1L5kRVmtbHD-c'}} 

I search the internet so far but no viable solution

I'm getting an error any time I try to moderate a comment on the website using the comments moderation tool "The content you requested cannot be displayed right now. It may be temporarily unavailable, the link you clicked on may have expired, or you may not have permission to view this page." What can I do?

Im trying to get all the comments of the posts, im using the after and before things of the cursor in Facebook graph, but it does not give me all comments.

const fetchAllPostComments = async (postId: string, after: string | null = null, limit: number = 25): Promise<any[]> => {     const pageQuery = after ? `&after=${after}&limit=${limit}` : `&limit=${limit}`;     const response = await fetch(`${GRAPH_API_URL}/${postId}/comments?access_token=${PAGE_ACCESS_TOKEN}${pageQuery}`);     const data = await response.json();     let allComments = data.data || [];     if (data.paging && data.paging.cursors && data.paging.cursors.after) {         const nextComments = await fetchAllPostComments(postId, data.paging.cursors.after, limit);         allComments = allComments.concat(nextComments);     }     console.log(allComments);     return allComments; };