While coding I have started wondering if there is a possibility to perform an action before the actual request is send.
For example I have a code:
FB.ui({method: 'apprequests',
title: 'The Challenge Game!',
message: 'I challenge you!',
}, challengeCallback);
And I would like my user to be able to challenge a friend only once - that means, If a challenge exists in DB connecting two users, there should not be another challenge created until the first one is finished or expired.
So between picking friends and sending requests there should be a function call.
However I know, that I won't get users fb_id before the request is actually send.
I can always prompt my user, after choosing friends, that the challenge for that particular person already exists and is pending. But what happens to request that is waiting for the challenged in his/hers inbox?
Is there something I can do not being made to create my own friend picker? Maybe alter FB.ui somehow?