• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest Facebook Helper

R

ragtek

Guest
#1
Pls allow us to add own perm params to
XenForo_Helper_Facebook::
PHP:
public static function getFacebookRequestUrl($redirectUri, $appId = null)
{
$perms = 'email,publish_stream,user_birthday,user_status,user_website,user_location';
 
if (!$appId)
{
$appId = XenForo_Application::get('options')->facebookAppId;
}
 
return 'https://graph.facebook.com/oauth/authorize?client_id=' . $appId
. '&scope=' . $perms
. '&redirect_uri=' . urlencode($redirectUri);
}
probably as 3rd method param?;)
 
R

ragtek

Guest
#2
atm the only way to have this without too much c&p is to extend the whole class, which is IMO still too much c&p :p

PHP:
class Ragtek_XXX_Facebook extends XenForo_Helper_Facebook{
 
    public static function getFacebookRequestUrl($redirectUri, $appId = null)
    {
        $perms = 'email,publish_stream,user_birthday,user_status,user_website,user_location,friends';
 
        if (!$appId)
        {
            $appId = XenForo_Application::get('options')->facebookAppId;
        }
 
        return 'https://graph.facebook.com/oauth/authorize?client_id=' . $appId
            . '&scope=' . $perms
            . '&redirect_uri=' . urlencode($redirectUri);
    }