I am using Facebook's Marketing API to create sponsored message as described here:
https://developers.facebook.com/docs/marketing-api/guides/messenger/#sponsored
After creating the ad, Facebook reviews the ad and then after approval ad gets sent to page audience. I want to know when my ad gets approved or rejected through webhook. Is it possible? Is there a way to receive webhook events for this?
There are some ad account related webhooks in Graph API. These will send events when your ad:
is in_process status
goes out of in_process status
has some issues with it
Please read up more on the official documentation:
https://developers.facebook.com/docs/graph-api/webhooks/reference/ad-account/
Related
I know it is possible to subscribe to webhooks (for a Meta/Facebook App) for a specific Facebook page by using https://graph.facebook.com/{pageId}/subscribed_apps?subscribed_fields={fields}&access_token={token} but how does this work for Instagram pages? The only text I have found about it states the following:
Note: You cannot use the subscribed_fields parameter to configure or subscribe to Webhooks for Instagram. You must use your app dashboard to subscribe to Instagram Webhooks (from https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps/)
But it sounds a bit weird that a customer using our App cannot connect their Instagram page to our App and have webhooks delivered, without me as an App-owner doing manual stuff in the app dashboard.
Am I missing something?
No need to subscribe instagram page you should just go to instagram entry on the developer facebook account webhooks and then subscribe to a field that you want to receive notifications . your facebook page should be associated to your instagram business account .
N.B For the feed of instagram we have only comments field
Currently, I have a webhook subscribed to Instagram story_insights on my Facebook app. The Facebook app has a bunch of Facebook Business pages tied to Instagram Business accounts. Following the steps here I have successfully set the webhook to work with test data from Facbeook; however, the webhook is never fired when a story ends/is deleted.
I am unsure how else to approach this. Has anyone encountered this issue before?
I am doing a project for my company and I am stuck. I have to make this cost-effective.
In this link there are some methods to get comments and do comment but it gives me error: "(#10) Application does not have permission for this action" and when I try to query them with standard API it says that media_id is not valid(I got the media id with oembed code btw I am not putting there effective story id).
My question is:
Do I have any solution for getting and doing comments to ads other than switching to Business API? If I don't how should I progress with this? Should I just send my app to review with instagram_manage_comments?
Thanks
Ad comments are on Ad media - and Instagram ads are only created via facebook ad account.
You have to use facebook ad graph API. You can check detail info at this answer: Instagram dark posts, using api to read info and do operations
The link you gave in the question is correct starting point to fetch ad media and comments. However you don't need Instagram accounts to be converted to "business account" to be linked with FB page(more context for that here). But you do need to connect with FB ad account for ads media.
I have used Facebook webhooks to retrieve check-ins for a particular Facebook page that I have created. I have implemented an endpoint to receive the webhooks notifications. I was able to get the messages and posts by test users through the webhooks. However I cannot get any check-ins done for the page. Is there any special permissions or way to get the page check-ins?
Is it possible to make a facebook webhook for event of approving the ad.
When you create an ad, it's in pending review status that can take some undefined time. I need to call some actions right after the ad is approved.
There are facebook webhooks for apps/pages/users. But what about Ads?
Actually #luschn, there are webhooks for certain Marketing API features.
Such as:
https://developers.facebook.com/docs/marketing-api/guides/lead-ads/webhooks/v2.5
There are no webhooks for Ads, webhooks only exist for Pages and Users. Here are all the possibilities: https://developers.facebook.com/docs/graph-api/webhooks
Edit:
My bad, there ARE webhooks for Ads: https://developers.facebook.com/docs/marketing-api/guides/lead-ads/retrieving#webhooks