I created an app on Facebook. Thanks to this app, the users can publish on their wall. All works fine, but I would like to specify an url to redirect to when the user click on the link "via {APP_NAME}" on a publication. For the moment, it's redirecting to https://www.facebook.com/apps/application.php?id=APP_ID
Link with text "via Application Name" that appear aside of stories published by applications lead to:
- Application Canvas URL - if Application have Canvas URL configured in application settings
- Application Site URL - if Application have Site (but not Canvas) URL configured
- Application Profile Page - if Application have regular Facebook Page associated with application and doesn't have Canvas URL specified in application settings
- Application Page - if neither Page associated with Application or Canvas/Site URL is defined
You cannot make this link to point to completely different URL.
If you still need a redirection to resource other than outlined above you can configure Application Site/Canvas URL and do redirection from there once users land to your Application with fb_source
parameter specified.
fb_source
may contain different values so you can decide if you want to do a redirection, it's not documented in complete way but there are some examples:
fb_source
- the stream type ('home', 'profile', 'search', 'ticker', 'tickerdialog' or 'other') in which the click occurred and the story type ('oneline' or 'multiline'), concatenated with an underscore.
fb_source
- the story type ('message', 'group', 'email') in which the click occurred.
fb_source
may be also feed
(and probably more values that documented elsewhere or not documented at all).
来源:https://stackoverflow.com/questions/10467644/facebook-apps-redirecting-via-app-name-to-an-existing-pages