redirect on facebook app install

后端 未结 2 1469
醉酒成梦
醉酒成梦 2020-12-16 08:21

Upon install of my app on a Facebook Page, I\'d like to send the user to an URL with further instructions. I\'m starting the installation with http://facebook.com/add.php?ap

相关标签:
2条回答
  • 2020-12-16 08:37

    First page that Canvas is point to should have
    < script type='text/javascript'>top.location.href = 'REDIRECT-URL';< /script>
    So when your app is opened it will automaticaly redirect to REDIRECT-URL

    I'm not sure that you can avoid opening of application canvas page after installing application.

    0 讨论(0)
  • 2020-12-16 08:54

    You can set the redirect URL in the app properties. You can no longer set it from the developer control panel in Facebook, but you can still set it using the REST api.

    The list of app properties is here: http://developers.facebook.com/docs/appproperties/

    To set the "post_authorize_redirect_url" you would use something like this:

    https://api.facebook.com/method/admin.setAppProperties?
      access_token=CURRENTTOKEN&
      properties={'post_authorize_redirect_url':'http://mydomain.com/post_authorize_folder/'}
    

    I am not completely clear on this, but I believe the url needs to point to a folder, terminated with "/" rather than a specific file.

    The callback gets two parameters: installed = 1 (true) fb_page_id = the page id when your app was installed

    0 讨论(0)
提交回复
热议问题