PHP

jQuery PHP: Facebook Friend Selector Without FBML

Oleh takien• 11 Komentar Arsip
Facebook Friend Selector, PHP + jQuery without FBML/iframe

Facebook Friend Selector

Facebook friends selector is one of important thing when you develop a Facebook application. It will simplify the way your visitor select their Facebook friend’s instead of manually find friend’s user ID.

Just type part of the friend’s name, the matches name will appears below the field and select one you want.

This is not just another Facebook friend selector you might found somewhere, because it’s not using FBML or iframe, there’s only JavaScript and PHP.


How it works?

  1. Once you logged in, the script will ask your permission to access your account (friends list etc).
  2. If you choose allow, then the script fetchs your friend data from https://graph.facebook.com/me/friends and get your friend lists in JSON format.
  3. Some PHP function convert it into PHP array and simplify it, do some filtering based on user input, then encode back to JSON format so it will compatible with the jQuery autocomplete plugin.

Can’t wait to see it in action?
Just follow the links below:


Credit: jQuery Autocomplete Plugins

Tulisan ini sudah berumur: 16 tahun 22 hari. Informasi di dalamnya mungkin sudah tidak relevan, tapi nilai historisnya sangat berharga, terutama bagi saya sebagai penulisnya.

Tag Terkait:

Komentar (11)

Arsip Statis
budakoyot
pertamax diamankan 😀 ane dongdot yah om :malus akhirnya ada tutorialnya juga, jadi semangat nih tinggal diakalin dikit2, mudah2an bisa :hammer:
bhcrew
wah template webnya keren 😀 ntar deh ane pake scriptnya, kalo lagi iseng lagi nerusin yang kemaren
dieka
ane juga pngen ah…. 😀
budakoyot
ane lagi2 bermasalah dengan konak facebook :mewek
BandenX
Gan, ada yg pake framework prototype nggak. Tuh kan nggak jauh beda sama ajax autocompleter/suggest. Gw biasanya pake duet prototype+scriptaculous (ajax autocompleter). Tapi nggak ada highlight dari keyword yg diinputkan di list suggestnya.
Kristjan
How to put this on tab? If i put this to tab it gives me errors and will not work.
kuratha
can’t display [target_id] with big length eg: 100000211240977
Bruno
Hi, problem with [target_id] too.. it returns -1 when the selected friend had relationship status
Mike
all i get is the circle spinning but no drop down containing a name? please help!
philip
thanks a lot for this, i just noticedthat if you use this code in a tab application it’s not working. anyone can help fix it? thanks a lot!!!
Joey
Can’t display big [target_id]. How fix this bug? Please!