Requests Dialog only works with Canvas-View?

2019-03-30 13:12发布

问题:

I've some page-tabs for a few fanpages and there I'd like to integrate the RequestDialog. But unfortunately it always tries to redirect the friend, that got a request, to the canvas page.

Is there a way to send the user to the page-tab, where his friend initially started the request dialog?

Thanks in advance, Jurik

回答1:

Accepting a request will always go to the canvas page with the request_ids parameter added. See the "User Response" section of this doc: https://developers.facebook.com/docs/reference/dialogs/requests/

Obviously you could write code to detect when the user arrives with the request_ids parameter and redirect to another page, like your Page tab, for example by setting window.top.location.href in JavaScript inside your canvas iframe.