Whitelisted callback for Facebook

Hi all,

I have been struggling with this for few days… wonder if anyone can help …

My whitelisted function received the callback from Facebook Subscription… i receive the Challenge, Mode, Token and when returning the challenge it send back even with INT like this {"message":79810…
Assuming the GET received like this {‘hub.verify_token’: ‘99998999’,‘hub.mode’:‘subscription’,‘hub.challenge’:‘34534343’}

if kwargs.get(‘verify_token’) == ‘token’
return int(fb_challenge) {"message":79810…

Reason why Facebook not accepting my Challenge code

The URL couldn’t be validated. Response does not match challenge, expected value=“79810020”, received="{"message":79810…

I think the solution is on this post. Thanks.

1 Like