Is there a way to retrieve calendar appointments from Facebook page? - facebook

I'm having a business page where customers can block an appointment at a specified time. It is shown in the "Appointments" section of the page.
Is there a way I can retrieve this using Graph API?
I've tried using the "conversations" in API since the "Inbox" section also shows the customer's request for the appointment.
But the "message" field is coming empty in the API

Related

Facebook Graph API Ad Creation: Unable to set the "Instagram account" dropdown field through API

I am currently creating an ad within a Facebook campaign using the Facebook Graph API. I am making a POST to "https://graph.facebook.com/v12.0/act_<Ad_Account_ID>/ads/".
Everything is working as expected, with the exception of trying to set the Instagram account field within the Identity section of the ad settings in the Facebook Ads Manager. I need to be able to set this field in order to automatically post the ad, otherwise the ad's status is "In review". The ads I am creating will not have an Instagram account attached to them and I want to set the Instagram account drop down field to "Use selected Page". The "Use selected Page" field seems to be a default option from what I can tell, however I can't seem to determine what the parameter and value I need to send in the POST would be.
I suspect that the "instagram_actor_id" may be the parameter I need to send over in the POST, but I have been unsuccessful in determining what the default value needs to be to set the Instagram account field value to "Use selected Page". Currently, the Instagram account field value is empty and I have to manually click the drop down to select the "Use selected Page" (only option as seen in the photo).
To clarify, I am not trying to connect an Instagram account, I just one to be able to set the Instagram account field to "Use selected page" via the graph API.
Facebook documentation for creating a dynamic ad (Step 4):
https://developers.facebook.com/docs/marketing-api/dynamic-ads/get-started#ad
Ad Creative Object Story Spec (instagram_actor_id):
https://developers.facebook.com/docs/marketing-api/reference/ad-creative-object-story-spec/
Facebook Ads Manager Ad Settings After Creating Ad
For pages that do not post to a specific Instagram account (i.e. when you see 'Use Selected Page' in the Ads Manager), Facebook creates what's called a Page-backed Instagram Account. This account cannot be logged into and is used only to publish campaigns related to that specific page.
You can find the ID of the Instagram account connected to a specific page through a GET request to the following endpoint: https://graph.facebook.com/<API_VERSION>/<PAGE_ID>/page_backed_instagram_accounts
See Facebook documentation here.
Save the ID related to that specific page and use it as the value for instagram_actor_id

How to get all the campaigns related to a page by using Facebook Marketing Api?

I used promote_pages endpoint (https://developers.facebook.com/docs/marketing-api/reference/ad-account/promote_pages/) to get all the promoted pages for an ads account.
To get more details for each page, I tried to put more parameters like (ad_campaign, engagement and category etc) but all the expected returned fields for ad_campaign is missing.
Sample request:
https://graph.facebook.com/v5.0/act_{{ads-account-id}}/promote_pages?fields=name,ad_campaign,engagement,category
(Also provided pagesAccessToken as BearerToken and pageAccessToken has 'public_profile', 'email','manage_pages', 'pages_messaging','publish_pages','ads_read','ads_management' permissions and already have business integration done).
I received all the fields properly except campaign data as there are several campaigns running for each page already.
Please let me know how to achieve the campaign data returned for each page under an ads account. Thank you so much in advance.

cannot get conversations of facebook page with API version 2.4

I'm trying to read conversations of my page but after creating a new "TestApp" on facebook I am not able to read the conversations of my page.
I used the Graph API Explorer for generating the Page Access Token but when I try to get the conversations of my page, the calls (graph.facebook.com/{my_page_id}/conversations) returns only the following fields: updated_time, link, id.
How can I retrieve the messages of any conversation_id returned by API? The API version used are 2.4.
In v2.4 you need to declare the fields you want in the response.
To retrieve all fields from the conversations endpoint you need to execute the following:
https://graph.facebook.com/v2.4/{page-id}/conversations?fields=snippet,updated_time,message_count,unread_count, tags, participants,senders,can_reply,is_subscribed
References
Declarative Fields https://developers.facebook.com/docs/apps/changelog#v2_4_changes
Conversation Endpoint https://developers.facebook.com/docs/graph-api/reference/v2.4/conversation/

Facebook Graph API - See user which liked our page

I want to create an entrance app for some events at a congress.
Only users which liked our company-facebook page before should be allowed to enter.
I was reading around the last days, that it is not possible (only if the user logged in with facebook connect on our site) to see via the Graph API, which users liked our page? We would have the email adress (over an external registration form), but not the FacebookID.
I'm wondering if there are solutions outside, which i didn't found...
It's not possible to get the list of users who have liked your page.
But since you are having the email_ids of the users who have liked the page, you were left with one thing - searching users with email_id BUT unfortunately this has been disallowed by facebook. See here. It says-
The ability to pass in an e-mail address into the "user" search type was removed on July 10, 2013. This search type only returns results that match a user's name (including alternate name).
For future ref, if you have some application, you can query for /me and save their facebook ids.

Possible to get Fan Page Update Information via API?

I receive an email once a week with information on my Fan Page (like how many more users than last update have become my fan, how many posts, etc). Is it possible to get this info via the FB API so I can show this data where I want outside FB and outside my email?
One of the way is using fql of facebook :
Group FQL Table
After you can get the group ids, you can use the group_member tables to get all members from that group:
Group Member FQL Table
You can even use Graph API if you want but I am not an expert of that