Users friendSelector Class

Allows selecting a facebook friend from the logged-in user's friends list.


Users friendSelector

  • [options]


  • [options] Object optional

    this object contains function parameters

    • [onSelect] Function optional

      This callback is called when the user selects a friend.

    • [customList] Array | Object | Function optional

      Optional. By default friends list is fetched from facebook, but here you can provide an array of friends or callback which in turn will call friendSelector callback passing it such array as first agrument. Callback may be a function or string name of the function. Array should contain objects like { id: 'id', name: 'name' } . 'includeMe' option is ignored if 'customList' provided

    • [includeMe] String | Boolean optional

      Whether or not to include user himself. Can be just boolean true or a string, which is used instead of user real name. Ignored if 'customList' option is provided.

    • [platform] String optional

      Has to be "facebook" for now.

    • [prompt] String | Boolean optional

      Specifies type of prompt if user is not logged in or didn't give required permission for the tool. Can be either 'button', 'dialog' or null|false. In first case just shows simple button which opens facebook login popup. In second case shows Users.facebookDialog prompting user to login. In third case will not show any prompt and will just hide the tool.

    • [promptTitle] String optional

      Used only when 'prompt' equals 'dialog' - will be title of the dialog.

    • [promptText] String optional

      Used either for button caption when 'prompt' equals 'button' or dialog text when 'prompt' equals 'dialog'.

    • [filter] Function optional

      Custom function to filter out the friends list.

    • [ordering] Function optional

      Custom function to order the friends list. By default friends are ordered by name.

Item Index