I have some questions regarding the Facebook WebHooks.
1)I would like to get notified every time a fb page gets a new like/post etc. I understand this is the feed field. I assume I have to be the facebook page admin for this?
2)What is the exact body of the update object that I will receive in this case? Will it contain information about the liker? Say his/hers email?
Related
Context: I'm building a webhook with NodeJS to get events from Facebook Page with my Facebook App. These events are: feed, mention (when a user tags the page on his wall) and message. I can get all events without problem. In all events I need to identify the user who write. When the users write a post or message in the page I get an ID (PSID) but when the user write a post on his wall tagging the page I can't get PSID, this is obvious because he isn't in the page scope. The only I get from this event is user-id from post-id.
I have tried the following:
I used this endpoint GET: /<user-id>/ids_for_pages as indicated in the documentation. This doesn't work for me because I would need that the pages are in my business administrator and this isn't possible because I need this webhook to manage many pages to many companies.
I used this endpoint GET: /<psid>?fields=name,id for events of type feed and messages (from Messenger) into the page but this gives me only PSID again.
Note: In my DB I save long-lived token of my page, ASID of the site owner and Page ID when my user does the login in the UI.
My questions:
Is possible transform user-id to PSID?
Can I get user-id through the PSID?
If you have a better idea to unify IDs when is the same user, I would like to know it. If this isn't possible I would also like know it.
My Goal: Each user event goes to the same case for the same user in my API, for this reason if the user is the same when tags the page and/or write a message in the page the idea is to identify him like same user and not like new case.
I'm trying to build a bot that would message anyone who mentions (#PageName) it. I have set up the mention webhook for my bot so that whenever anyone mentions my page in a comment or post, I receive a notification. Unfortunately, Facebook doesn't make it easy to message the person who mentioned my page, since there are different page IDs and messenger IDs. I am able to fetch the user ID from the mention by fetching the from field from the graph API, but is it possible to convert this user ID to a messenger ID so that I may actually message the user?
I have searched on Google and Fb's documentation about this but didn't find anything.
I've already shared content of my page on Facebook with the Share button provided by FB's api and also made an app on Facebook.
Now I want to receive notifications in my page when someone comments the publication or likes it.
I know that I can consult the posts/comments/likes if the user gives me the permissions, but I don't want to do this every 5 minutes. I want that facebook notifies me like a push notification.
How can I do that if it's possible?
Thanks!
After the user shared something on his wall, there is no way for you to get notified about comments/likes on that wall post, unless you authorize the user with user_status or read_stream.
That being said, there is the Realtime API with the feed and statuses fields to subscribe to: https://developers.facebook.com/docs/graph-api/real-time-updates/
That´s probably the best option, although you must authorize the user with the correct permissions too.
I am currently implementing Facebook on an eCommerce store.
I have a Facebook page for the actual store and I also have links on each of the product pages where visitors can "Like" the individual products.
Now, I know that when someone "likes" the actual Facebook Page of the store, they receive status updates whenever that page makes a post on their wall.
Is there any way to integrate this also if someone only likes a product, instead of the entire Page, they also receive status updates of the Page?
Or do they need to like the actual Page in order to receive updates.
I hope someone with experience in integrating this can help me. Thank you very much :)
The question is: Building a relationship with a user visiting your page or an opportunity to reach to friends of that particular user.
If the user likes a post, link or an article on your web page this is a one time action and after some time this action will disappear from his/her friends' news feed. And the opportunity to interact with that user one more time will disappear as well. But if that user likes your page so you will have one more fan who will receive your updates every time you post them (Actually this is not always as Facebook news feed algorithm can filter your post).
But what can I suggest is: Put a separate Like Box in your web page to gain more likes for your Facebook page. This like will be more targeted and relevant, as they know what they are doing and they will not be surprised if they see some posts from your page on their news feed. This could be a better experience for your page. And secondly put separate like button on each product with correct meta tags and if it interests particular users they will go to your web page and if they like it, they will also connect to your Facebook page.
I have a facebook fan page, what I am aiming to happen is for when a user likes the page they receive a notification or facebook mail telling them to come and visit the page to receive their free voucher code.
However I am unsure of how to do this.
Would this be a CRON job that checks when the page receives a new user, then finds the users and user a facebook api function to either give a notification or mail?
If could be a cron job, if Facebook allowed you to determine who likes a page.
Fortunately facebook does not allow this.
If you have an app, and a user uses your app
They do allow you to check if a particular user likes a page
however that requires the user to grant extended permissions to that app.
Your best bet is to inform people who view your page, that they can get a free voucher by subscribing to your app.
Then you can create a cron job that sends out email on new app registrations.