codersgrave / facebook-friend-selector Goto Github PK
View Code? Open in Web Editor NEWThis repo is no longer maintained. Feel free to fork and update!
Home Page: http://facebook-friend-selector.codersgrave.com
This repo is no longer maintained. Feel free to fork and update!
Home Page: http://facebook-friend-selector.codersgrave.com
I can't find an option to avoid showing the invite popup after submit. I just want the select uid and nothing more.
I have copied all the files on my server. When i click on the link to open friend selector window I get following error message:
Uncaught TypeError: Object # has no method 'onPreStart' jquery.friend.selector-1.2.1.js:27
Could you please let me know whats wrong here?
Hi there,
It seems like there is some trouble on the focus when the friend selector is launched together with a Twitter Bootstrap modal.
I've created this very simple page that takes your example page and starts the friend selector from a modal in the Twitter Bootstrap.
http://www.stateezticsapp.com/debug/testFS.html
Cheers
Hi,
Thanks a lot for this plugin who seem ideal for my current needs.
The only problem I have is that I can't figure how to display the dialog box.
The data is fetched and everything but I can't see nothing on screen except a little gray circle.
The panel doesn't extend or anything. :(
Any idea what could be wrong?
how to access full name on response ?
Tried response.name but it returns undefined.
Hi,
I'm having some problems getting this to work with Facebook SDK for JavaScript with jQuery and Firebase Facebook Authentication.
After I login with Facebook and press the link with class="bt-fs-dialog"
I only get the error You must connect to Facebook to see this.
Here is some code that will add groups to the selection list. The app needs to request 'user_group' permission.
_getFacebookFriend = function () {
$('#fs-user-list').append('<div id="fs-loading"></div>');
// start of group changes
//FB.api("/me/groups", function(response){
FB.api('/', 'POST', {
batch: [
{ method: 'GET', relative_url: 'me/friends' },
{ method: 'GET', relative_url: 'me/groups' },
]
}, function (response) {
if (response.error) {
alert(fsOptions.lang.fbConnectError);
_close();
return false;
}
//var facebook_friends = response.data;
var facebook_friends = JSON.parse(response[0].body).data;
$.merge(facebook_friends, JSON.parse(response[1].body).data);
// end of group changes
I am somewhat of a javascrips beginner, so please improve. .. and I've never forked anything on GitHub.. so not even sure how to go about that.
Sam
What happens after the final API change in 2015?
As it says: “Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app.”
Can you say something about that?
Thanks and cheers
Yves
Getting following error when clicking on link to open popup:
Failed to load resource http://friend-selector/jquery.friend.selector-1.2.1.css
Failed to load resource http://friend-selector/jquery.friend.selector-1.2.1.js
Uncaught TypeError: Object [object Object] has no method 'fSelector' home.php:43
Could you please let me know what I am missing?
Hello,
Line 77 the callback : fsOptions.onSubmit(selected_friends); is called even if the user canceled his share in the FB.ui('apprequest') popin ,
the workaround is to check if there is no error_code in response object :
if(!response.error_code) fsOptions.onSubmit(selected_friends);
Hi - thanks so much for this plugin! I'm having a bit of trouble though. Even in your examples, when I click on the friend-selector samples, I get the spinning beachball of death and have to restart the browser. (To be fair, the FB app sample that FB themselves provide does the same thing. Friendsmash, when I play it online or locally, lets me click 5 times and then locks everything up.) Is anyone else having this issue? No errors in the console, it just hangs.
i've found that if you set the option "max" to, for example, 1 the script prevents you from selecting more than one only if you click in the user's name but not if you click the checkbox (i was able to select and get 3 friend's IDs besides restricting to max 1).
The temporary solution i've found was to add this line on the "click" function (under the "else" clause):
if (limit_state === false) { btn.find('input.fs-friends').attr('checked', false); // ADDED return false; }
Hope this helps to correctly fix it.
For some use-case I need to use friendselector function using jquery'on (http://api.jquery.com/on/)
Could you please help me how can I use this function with jquery's on:
$(".bt-fs-dialog").fSelector({
onSubmit: function(response){
// example response usage
alert(response);
}
});
I have used this in my facebook application. But when i try to test this using facebook test account it does not work.
Any help?
In the documentation on the website, it says that the facebookInvite option was set to false by default, but I had to explicitly declare it as false to not have the friend selector send app requests. Looked through the js and facebookInvite is set to true by default, so I guess either that or the documentation should be changed?
Hi,
first of all, thanks for your work, we used your plugin in a previous project and it's realy cool and easy to integrate.
But in our last project we had an issue : calling FB.api('/me/friends') only return the facebook friends who also use the app.. so it's not realy usefull for social sharing...
Apparently it seems to be a new thing in Facebook API V2 according to this
So the solution I found may be usefull for someone else : (Sorry, but I didn't have much time to create a full PR, with test and all the code, and I didn't know if i'm the only one having this issue or not..)
First : in your facebook application settings, set "game" as categorie
Second : in your script, method getFacebookFriends change FB.api('/me/friends') by FB.api('/me/invitable_friends') a method only available for games app (I don't know how work this block and I didn't use it, so I didn't take a look at it.
One of the main specificity to /me/invitable_friend is to not return the real facebook id of the friend, instead, we have a specific key to use as ID for inviting friend, plus a link to his profil pic, so we have to change a little bit the markup :
Third : (before third step, I think the method parseFacebookFriend need some change, but I didn't use any options in it, so i didn't have to change anything. In _setFacebookFriends
var link = '<a class="fs-anchor" href="javascript://">' +
'<input class="fs-fullname" type="hidden" name="fullname[]" value="'+v[k].name.toLowerCase().replace(/\s/gi, "0")+'" />' +
'<input class="fs-friends" type="checkbox" name="friend[]" value="fs-'+v[k].id+'" />' +
'<img class="fs-thumb" src="https://graph.facebook.com/'+v[k].id+'/picture" />' +
'<span class="fs-name">' + _charLimit(v[k].name, 15) + '</span>' +
'</a>';
become :
var link = '<a class="fs-anchor" href="javascript://">' +
'<input class="fs-fullname" type="hidden" name="fullname[]" value="'+v[k].name.toLowerCase().replace(/\s/gi, "0")+'" />' +
'<input class="fs-friends" type="checkbox" name="friend[]" value="fs-'+v[k].id+'" data-id="'+v[k].id+'" />' +
'<img class="fs-thumb" src="'+v[k].picture.data.url+'" />' +
'<span class="fs-name">' + _charLimit(v[k].name, 15) + '</span>' +
'</a>';
And if I do not forgot something, the last step is to modify _submit method
Line 63 became :
selected_friends.push($(this).data('id'));
Line 69, replace
var friends = selected_friends.join();
by
var friends = selected_friends.join(',');
And there you are!, now the plugin almost work with the FBK API V2, but as i said before, there a lot of option i didn't use in your plugin so I didn't test all of them.
(Sorry for my english, hope you will understand me and it gonna be usefull)
After selecting friend from window when I click on Send button window is not getting closed. Could you please direct me to the code where I can modify it to work?
Thanks,
Pratik
Hello Sir,
http://www.keenuapps.com/fb/example/index.html
Please check this link as here Popup is coming fine but Friends are not visible in popup. So I'm unable to use this code properly. Can you please resolve this issue.
Regards,
Harish Madaan
Sorry for being so stupid but I am new to javascript so could not find a way.
I am currently using it the same way you have shown in your example:
a href="javascript:{}" class="bt-fs-dialog">Click here
and in JS
jQuery(document).ready(function($) {
$(".bt-fs-dialog").fSelector({
onSubmit: function(response){
}
});
});
Now I want to pass some parameter when I click on this link.
Could you please let me know how can I do it?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.