Support » Plugin: Social Connect » Get more info – setting scope permission

Viewing 4 replies - 1 through 4 (of 4 total)
  • For anyone neeeding this, I changed the scope in media/js/connect.js, like'' + client_id + '&redirect_uri=' + redirect_uri + '&scope=publish_actions,user_birthday,user_hometown,email',

    Than I just added saving of these fields, like

    $sc_birthday = date('Y-m-d',strtotime($fb_json->{ 'birthday' }));
                $sc_hometown = preg_replace('/^([^,]*).*$/', '$1', $fb_json->hometown->{ 'name' });

    and later

    Plugin Author Rodrigo Primo


    Thanks for sharing! This might be useful to other users of the plugin.

    Changing the plugin code directly has the disadvantage of complicating future plugin updates in your site.

    If you are interested you could create a new pull request on the GitHub repository ( with new hooks so that you could get and save the birthdate without changing the plugin code directly. Others might benefit from those hooks to get and save other user fields.

    This is difficult to do upgrade safe, as I don’t see a way to change the connect.js dynamically.

    Maybe you could help?

    Plugin Author Rodrigo Primo


    I think you could generate the list of fields to get from Facebook in a PHP file and use wp_localize_script() to pass it to connect.js.

    In the PHP file you could have the default list of fields and a filter if someone wants to change that list.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Get more info – setting scope permission’ is closed to new replies.