質問

I wonder if it's possible to use FB.ui to invite friends to a custom page of my web application, but not to it's index.

Apprequests method doesn't seem to have any parameters as customizable uri

  FB.ui({method: 'apprequests',
    message: 'yay!',
  });

In case if it's impossible to achieve with FB.ui, I would be glad to accept any other options. Thanks in advance.

役に立ちましたか?

解決

By default, the invite will always send the user to the default canvas URL for your application. What you should do is detect this URL on the Index page, and then redirect them where you actually want them to go.

The way to do this is to look for the request_ids in the URL ($_GET) and then do a API call to /$request_id to verify it. Then you can redirect the user to any page you want (either JavaScript redirect, or PHP header redirect).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top