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

Handle user_ref field of sender in messaging_referrals #1158

Closed
swapnilpandey03 opened this issue May 31, 2021 · 2 comments
Closed

Handle user_ref field of sender in messaging_referrals #1158

swapnilpandey03 opened this issue May 31, 2021 · 2 comments
Assignees
Milestone

Comments

@swapnilpandey03
Copy link

swapnilpandey03 commented May 31, 2021

I am receiving this payload from a chat plugin when a user presses the get started button:

{
   "object":"page",
   "entry":[
      {
         "id":"124924473551",
         "time":1622440770209,
         "messaging":[
            {
               "recipient":{
                  "id":"124924473551"
               },
               "timestamp":1622440770209,
               "sender":{
                  "user_ref":"105917555039643"
               },
               "postback":{
                  "payload":"hey",
                  "referral":{
                     "ref":null,
                     "source":"CUSTOMER_CHAT_PLUGIN",
                     "type":"OPEN_THREAD",
                     "referer_uri":"https:\/\/www.xyz.com\/abcd",
                     "is_guest_user":false
                  },
                  "title":""
               }
            }
         ]
      }
   ]
}

However, when I convert it into a MessageItem, there is no such field as user_ref in sender but only id. Am I missing something or is this field yet to be added?

RestFb version we are currently using: 3.0.0

According to Facebook: Link here
Breaking Change (May 5, 2020) Graph API v7.0+ messaging_referrals webhook event from the chat plugin will not be returning sender.id field. It will return a new sender.user_ref field. This changes will take effect on all older Graph API versions starting Nov 2, 2020.

@nbartels
Copy link
Contributor

nbartels commented May 31, 2021

Oh yes, this field is missing. I'll add it. Thanks for the json!

@nbartels nbartels added this to the 3.19.0 milestone May 31, 2021
@nbartels nbartels self-assigned this May 31, 2021
@vikasaini
Copy link

can you please also add the field user_ref in recipient also

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants