Facebook "apprequests" with custom URL?

I have a simple question, I am developing a facebook application and use this code to create applications

FB.ui({method: 'apprequests',message: 'Invite friends'}, requestCallback); 

I want to set a custom url when the user accepts the request. for example: stackoverflow.com

any suggestions?

+6
source share
2 answers

If the user clicks “Accept” in the request, he will be sent to the URL of the canvas page of the application that sent the request with request_ids

https://apps.facebook.com/[app_name 022/? Request_ids = [request_ids]

Make your own URL 1) store request_id in your application using a special link 2) when the user accepts the link, reads request_id and launches the custom URL

+3
source

There is no parameter for the URL in the API, but you can use a data parameter for it.

 FB.ui({method: 'apprequests', data: "http://stackoverflow.com" ,message: 'Invite friends'}, requestCallback); 

https://developers.facebook.com/docs/reference/api/user/#apprequests

0
source

Source: https://habr.com/ru/post/902894/


All Articles