1. 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

Discussion in 'Closed Suggestions' started by ragtek, Apr 9, 2012.

  1. ragtek

    ragtek Guest

    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?;)
     
  2. ragtek

    ragtek Guest

    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);
        }
     

Share This Page