Topic-icon Custom Requests

Active Subscriptions:

None
14 years 3 days ago #23488 by simcro
Custom Requests was created by simcro
I have successfully got custom requests to work as far as the content of the request, the thank you url with unique CGI strings but the destination URL seems to be a problem. I understand that if someone accepts a request there is a call to the site and the destination is then sent to FB at the same time as deleting the request. Would there be any way to store a unique request db record for each customised request so that customised destination url could be used?

Code below should give you an idea of what I am trying to achieve

foreach ($result as $row) {
$hash=md5(time().$gu_id.$row);
echo '
var jfbcRequests = Object.prototype.toString.call(jfbcRequests) == "[object Array]" ? jfbcRequests : [];
var jfbcRequest = new Object;
jfbcRequest.title = "Send '. $row .' to your friends";
jfbcRequest.message = "'. $row .'";
jfbcRequest.destinationUrl = "treasure.blackjack.com/receiveitem?req='.$hash.'";
jfbcRequest.thanksUrl = "treasure.blackjack.com/sendconfirm?req='..._id.'&item_id='.$row.'";
jfbcRequests.'] = jfbcRequest;
';

Thanks Url currently saves a record of the request to stop more than 1 request per day and that is working fine
The topic has been locked.
Support Specialist
14 years 3 days ago #23495 by alzander
Replied by alzander on topic Custom Requests
Simon,
Yeah... we meant to add dynamic destination requests to the 4.2 release, but got sidetracked and didn't have enough time to test. However, the good news is, the code is pretty much available for doing it. The post below should explain just about all the requirements. The topic was for v4.1, but just about all the code should work for v4.2 right away:
www.sourcecoast.com/forums/jfbconnect/jf...-requests?p=1#p19197

Please make sure you read the posts below as well as there were some additional fixes included. We didn't get huge feedback as to whether the solution was perfect, but it should be a great starting point to do what you're looking for. If you run into issues or have questions, just let us know here.

Also, please try to develop on a test site where possible! The changes should break anything, but it's always possible it will.

Thanks,
Alex
The topic has been locked.