简体   繁体   中英

redirecting after facebook app request

I am sure it is a simple question but I am not familiar to the Facebook api. I have a Facebook app, and I send some app request

FB.ui({method: 'apprequests',
                             message: 'Would you join me ?' + ' ' + url,
                             to: $some_id
                             });

The app request is correctly sent but when when the invited user clicks on his Facebook space notification, he is not redirected to the url but instead in some https://apps.facebook.com/myapp/.... url which crashes. It seems to be my canvas page but what am I suppose to do with this url, how do I put code to redirect the user ?

App requests should only be used for Canvas applications - the notifications will always link to the Canvas URL for your application. You can simply point the Canvas URL to a page within your app to redirect the user elsewhere, but it's not permitted by Facebook Policies.

As the Platform Policy states:

Don't build an app whose primary purpose is to redirect people off of Facebook.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM