
com.threerings.facebook.servlet.FacebookConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ooo-facebook Show documentation
Show all versions of ooo-facebook Show documentation
Various Facebook helper bits used by OOO.
The newest version!
//
// $Id$
package com.threerings.facebook.servlet;
import javax.servlet.http.HttpServletRequest;
import com.threerings.app.server.ServletAuthUtil;
/**
* Provides Facebook configuration information to things that need it.
*/
public abstract class FacebookConfig
{
/**
* Returns our Facebook API key.
*/
public abstract String getFacebookKey ();
/**
* Returns our Facebook app secret.
*/
public abstract String getFacebookSecret ();
/**
* Returns our Facebook app id.
*/
public abstract String getFacebookAppId ();
/**
* Returns our Facebook app name.
*/
public abstract String getFacebookAppName ();
/**
* Returns the bare URL to our Facebook app.
*/
public String getFacebookAppURL (HttpServletRequest req) {
return getFacebookAppURL(ServletAuthUtil.getScheme(req));
}
/**
* Returns the bare URL to our Facebook app.
*/
public String getFacebookAppURL (String scheme) {
String appname = getFacebookAppName();
String apppath = (appname != null ? appname : "missing_appname");
return scheme +"://apps.facebook.com/" + apppath + "/";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy