Posts tagged with facebook-graph-api

I'm building a solution that'll require me to authenticate Facebook business accounts and get access to their pages and Instagram handles. And my platform will be used to posts and schedule. Just like Ayrshare. How can I get scopes for :-

instagram_business_content_publish pages_manage_posts pages_show_list publish_video

I tried react @greatsumini/react-facebook-login but its not allowing me to add more scopes

<FacebookLogin       appId={process.env.NEXT_PUBLIC_FACEBOOK_ID as string}       onSuccess={FacebookLoginOnSuccess}       onFail={(error) => {         console.log("Login Failed!", error);       }}       onProfileSuccess={FacebookOnProfileSuccess}       style={{         backgroundColor: "#4267b2",         color: "#fff",         fontSize: "16px",         padding: "12px 24px",         border: "none",         borderRadius: "4px",       }}       scope="email,public_profile"     /> 

I am unable to get the Facebook Send Dialog as a URL to work. No matter what I try out I get the following error, so I assume I am using the Facebook Send Dialog wrong.

An error occurred. Please try later API Error Code: 1 API Error Description: An unknown error occurred Error Message: kError 1545116: Thread disabled: This thread is disabled 

The documentation says the following:

http://www.facebook.com/dialog/send?   app_id=123456789   &amp;link=http://www.nytimes.com/interactive/2015/04/15/travel/europe-favorite-streets.html   &amp;redirect_uri=https://www.example.com/ 

Can anyone give me a working example of such as a link, or even know what the error means? I have tried many variations of different links. Could there be some settings in the Facebook app that needs to be changed?

I have also tried Send Dialog with the js FB SDK getting the same error there.

We are trying to get an list of Instagram accounts associated to a Facebook business account. The endpoint we are trying to call is: https://graph.facebook.com/v20.0/<business_id>/owned_instagram_accounts?access_token=<access_token>

When using an account which has a developer role in the app the call returns a 200 as expected. But when we use an external account we get the following error:

"error": {     "message": "Unsupported get request. Object with ID '951060758639721' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api",     "type": "GraphMethodException",     "code": 100,     "error_subcode": 33,     "fbtrace_id": "APTgzDN8PxkeXGu_IZ7HS3q" } 

These are the permissions we have granted and which we all have advanced access from facebook: email, catalog_management, pages_show_list, ads_management, business_management, instagram_basic, pages_read_engagement, public_profile.

Our app is also in live mode.

Does anyone know what we are doing wrong or what we are missing?

We tried everything we know of, tried multiple methods. have requested access to multiple permissions but nothing seems te be working

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