I created a webhook for facebook, the subscription worked fine, (See the JSon result below). But whenever i send a message to the page, the webhook doesn't receive anything, the only entries from the webhook that i receive is when i subscribed to the page.
{
"data": [
{
"object": "page",
"callback_url": "https://{MY_DOMAIN}.nl/facebookmessenger/webhook/index.php",
"fields": [
"conversations",
"message_deliveries",
"messages",
"messaging_account_linking",
"messaging_optins",
"messaging_postbacks"
],
"active": true
}
]
}
I know for a reason that the webhook page itself works. So i don't feel the need to add it here.
If there's anything else you need to ask, you're free to ask
Well, i feel dumb. I linked everything up, but forgot to put the page i'm using on the developers.facebook.com at the messenger webhook. Sorry about that haha
Related
I've set up a webhook in facebook properly and I'm receiving feed updates. So I will be notificated by adding a like, changing a comment and so on.
But when I dislike the page, there is no action send. I dont not receive anything.
I get this one, when a user adds a like:
{"entry": [{"changes": [{"field": "feed", "value": {"item": "like", "verb": "add"}}], "id": "216046745080249", "time": 1556272643}], "object": "page"}
How to determine if a user dislikes the page?? And maybe get something similar?
I subscribed to feed webhook and I ve receiving posts everytime the user navigate and search something.
Is the expected behavior because documentation say:
Describes changes to most sections of the user's profile, such as About, Photos, Posts, Friends, and Likes
The json that I receive is:
{
"entry":
[
{
"time": 542196889466880,
"id": "0",
"changed_fields": ["feed"],
"uid": "XXXXXXXXXXXXX"
}],
"object": "user"
}
Can you provide JSON of Facebook you receive when the user navigate and search something?
I'm using webhook. I've only subscribed to webhook feed, and I only receive event data when user comment/post/reaction in my page.
Does Facebook have a webhook that an app can subscribe to to detect when a Facebook event is added to a page? Or do apps that are interested in this information just have to repeatedly poll /[page-id]?fields=events ?
For example if you have a page that creates some event, as long as you subscribe to feeds, Facebook Realtime API will send you json payload that looks similar to this:
{
"entry": [
{
"changes": [
{
"field": "feed",
"value": {
"story": "Some page added an event.",
"item": "event",
"event_id": "2277580782468248",
"post_id": "1442694315844896_2277580782468248",
"verb": "add",
"created_time": 1511651353,
"message": "test event"
}
}
],
"id": "1442694315844895",
"time": 1511651355
}
],
"object": "page"
}
Then you probably would like to pull the Graph API for additional informations about your event_id
The product you are trying to find is Facebook Webhooks https://developers.facebook.com/docs/graph-api/webhooks/. It allows you to subscribe to changes on the Facebook page and get alert only when change occures. You don't need to have regular calls with Graph API to see whether there are changes.
First you need to create facebook app, and then to add webhooks on that Facebook app. Next step is to subscribe that webhook to page you want and select "feed" as subscription. You will be informed about any change on your page.
I have setup realtime facebook update for both user and page. Whenever user updates his status, I get request on my server about the change. The data I get from facebook post call is like below.
{
"object":"user",
"entry":[
{
"uid":"10152689315982483",
"id":"10152689315982483",
"time":1427362347,
"changed_fields":[
"feed"
]
}
]
}
But I did not get any call from facebook when admin of a page update its status.
I followed the below steps to get the realtime facebook update.
Subscribe user/page to get updates with access token.
graph.facebook.com//subscriptions?object=user&fields=feed&verify_token=&method=post&callback_url=htps://serverurl/realtime.php
To get the list of subscription
graph.facebook.com//subscriptions
From this call I get both user and page data.
{
"data": [
{
"object": "user",
"callback_url": "https://serverurl/realtime.php",
"fields": [
"feed"
],
"active": true
},
{
"object": "page",
"callback_url": "https://serverurl/realtime.php",
"fields": [
"feed"
],
"active": true
}
]
}
I also added the app to page-tab but still not getting the updates for page. Could anyone tell me what I am missing?
Do an http GET on
https://graph.facebook.com/v2.3/{page-id}/subscribed_apps?access_token=PAGE_ACCESS_TOKEN
If your app is not listed, you need to "install it" (this is an alternative installing the app as a page tab app). Do this by issuing a post request to the same url. Eg with curl,
curl -X POST "https://graph.facebook.com/v2.3/{page-id}/subscribed_apps?access_token=PAGE_ACCESS_TOKEN"
You don't need to supply any parameters since the id of the app you wish to install is inferred from the access token.
If /subscribed_apps already includes your app id, you may be experiencing a bug and should report it at http://developers.facebook.com/bug
I'm setting up Facebook Real-time updates for an app so that I can read user's status updates as they happen, but I'm not getting updates. As far as I can tell I've set everything up correctly. Here's my subscription:
{
"data": [
{
"object": "user",
"callback_url": "*****/facebook-rt-callback.aspx",
"fields": [
"checkins",
"feed"
],
"active": true
}
]
}
When I test my subscription, my callback gets the request and FB shows that it worked correctly.
When user's give access to my app, I request scope=user_status,user_checkins. I also have these permissions defined in my app on FB. My test user is able to login and give permission to my app, but when the test user posts status updates or checkins on his timeline, my callback never gets hit.
Any ideas? Thanks.