Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subcribing on webhook: feed --- Two webhook event received by commenting to the profile picture post. #1

Closed
sarrtle opened this issue Mar 6, 2025 · 0 comments
Labels
bug Something isn't working question Further information is requested

Comments

@sarrtle
Copy link
Owner

sarrtle commented Mar 6, 2025

Introduction

When your app is subscribed to the feed webhook, you will receive notification when someone commented on your post, or you post something in your timeline, it will also notify you when they edit their comment or you edit your own post.

Problem

Facebook is sending a webhook data that symbolized something like a single photo post. According to the current build of the objects in fbtools, it is always a FeedNewPostWithPhoto, and marked as verb:edited, means it is sending a signal that the post is edited even there are no changes aside from the link, from_ alias="from": from_.name and from_.id.

link: it changes but still the same profile picture image
from.name: the name of the commenter, can be the page or the users
from.id: the id of the commenter, can be the the page or the user

And there is no other way around how to know if this edited event is a profile picture post or not, even as their docs says item supposed to have profile on it, but it shows item:photo that has same model structure of FeedNewPostWithPhoto.

And I don't know why they need to send a webhook event of an edited verb on profile picture post when someone commented on it.

Solution

Current solution is to put this on cache and exclude the link, from.id and from.name data. But the catch is, first time run of the listener may double the webhook event if someone commented on the profile picture while the app subscribed to the feed webhook, but the app of the user who will use fbtools will handle that easily to see if the changes have some differences than the current data they have if they want to apply the changes of the post whatever their algorithm may be why they want to receive notification when the page edited their posts.

@sarrtle sarrtle changed the title Two webhook received on feed webhook by commenting to the profile picture post. subcribing on webhook: feed --- Two webhook event received by commenting to the profile picture post. Mar 6, 2025
@sarrtle sarrtle added question Further information is requested bug Something isn't working labels Mar 6, 2025
sarrtle added a commit that referenced this issue Mar 6, 2025
@sarrtle sarrtle closed this as completed Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant