重定向到Facebook应用程序安装 [英] redirect on facebook app install

查看:115
本文介绍了重定向到Facebook应用程序安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Facebook页面上安装我的应用程序后,我想将用户发送到一个URL,并附有进一步的说明。我正在使用 http://facebook.com/add.php开始安装api_key = app_api_key& page = page_id ,它安装,但将用户重定向到Facebook Page本身。在某些时候,似乎有各种形式的重定向可用:

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?api_key=app_api_key&page=page_id, which installs but redirects the user to the Facebook Page itself. It seems like various forms of redirect were available at some point:


  • 后授权回调URL。我在App设置中找不到。

  • add.php的下一个参数。我似乎无法让这个工作

我已经看到一些在安装时重定向的应用程序,所以我相信这是可能的。也许这是使用旧的后授权设置,不再可见?

I have seen some apps that do redirect upon install, so I believe this is possible. Maybe it's using an old Post-authorize setting that's no longer visible?

任何帮助或点将不胜感激!我也没有附加使用add.php,如果有一个Facebook Connect方法,我会用它(我正在看profile.addtab,但似乎也不起作用)。

Any help or point would be greatly appreciated! I'm also not attached to using add.php, if there's a Facebook Connect method that does this I'd use that instead (I'm looking at profile.addtab though that doesn't seem to work either).

推荐答案

您可以在应用程式属性中设定重新导向网址。您不能再从Facebook中的开发人员控制面板设置,但您仍然可以使用REST api进行设置。

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.

应用程序属性列表如下: http://developers.facebook.com/docs/appproperties/

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

要设置post_authorize_redirect_url,您将使用以下内容:

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/'}



我不完全清楚,但我相信url需要指向一个文件夹,以/结尾,而不是特定的文件。

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.

回调获取两个参数:
installed = 1(true)
fb_page_id =安装应用程序时的页面ID

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

这篇关于重定向到Facebook应用程序安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆