PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, February 27, 2022

[FIXED] Facebook API "conversations" webhook

 February 27, 2022     facebook-graph-api, facebook-php-sdk, facebook-webhooks, php     No comments   

Issue

I'm developing a bot that receives a call from "conversations webhook" to know when a page receives a new message and answer it from my bot.

I've tried "messages" but I can not even make it activate when they send me a message.

I have my conversations webhook active. The "conversations" callback is something like this:

{"entry":[{"changes":[{"field":"conversations","value":{"thread_id":"t_100006208XXXXXX","page_id":309151156XXXXXX,"thread_key":"t_100006208XXXXXX"}}],"id":"309151156XXXXXX","time":1510581746}],"object":"page"}

The problem is that the webhook always sends the same thread_id and thread_key. The page_id does change, but I can not find the way to know which conversation is the one that varies.

Thank you!


Solution

I solved it! The problem was that I made the call to the api with an access_token from my app, and not from the site itself.



Answered By - Iván Tammaro
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing