I have a PHP application running in iFrame mode. I am rendering an <fb:multi-friend-selector condensed="true"> inside of <fb:serverfbml> tags. This is inside a PHP file that calls a function that gets a list of user IDs using $facebook->api_client->friends_get();. The multi-friend selector renders just fine, but, when I leave the friend_get() call uncommented, the page takes between 15-20 seconds to load (confirmed with Firebug)! The goal is to limit the number of users displayed in the selector by building a list of user ids not to display, for use in the friend selector's exclude_ids parameter. And since it's "exclude_ids" and not "include_ids", I can't think of a way of getting around this api call. It seems to me there must be something I can do to make the api call faster, because I've seen friend selectors that load much more quickly.
Facebook API friends_get is extremely slow
1.1k Views Asked by MBuscemi At
1
There are 1 best solutions below
Related Questions in PHP
- php Variable name must change in for loop
- register_shutdown_function is not getting called
- Query returning zero rows despite entries existing
- Retrieving *number* pages by page id
- Automatically closing tags in form input?
- How to resize images with PHP PARSE SDK
- how to send email from localhost using codeigniter?
- Mariadb max Error while sending QUERY packet PID
- Multiusers login redirect different page in php
- Imaginary folder when I use "DirectoryIterator" in PHP?
- CodeIgniter + XDebug: debug only working in the main controller, index() function
- PHP script timeout when I use sleep()
- posting javascript populated form to another php page
- AJAX PHP - Reload div after submit
- PHP : How can I check Array in array?
Related Questions in FACEBOOK
- Facebook Api - Albums/Photos/Comments
- How to get Facebook subscriber count + friend count
- Firebase facebook authentication not working
- Facebook iOS SDK 4 error info.plist
- Why don't any of my facebook share buttons work?
- Can't perform authentication through facebook with Parse
- PlayN and Firefox issues
- How do I stop the facebook send widget from going off the screen?
- Add extended permissions - Facebook
- Pass image, summary, URL to Facebook share button in ASP.NET MVC
- Facebook Open Graph Description in a message length limitation
- Facebook ShareKit image caption not working
- how to display Notification Count in iOS like Facebook
- How to estimate current situation of an old site not created by myself before i launch my new one?
- Facebook Graph API limit publishing to fan page
Related Questions in FBREQUEST-FORM
- How can I retrieve friend's picture through FBRequest in swift
- Not receiving response from facebook
- fb:request-form showing blank page
- Display friend Facebook on IOS
- Facebook API friends_get is extremely slow
- iOS >> ShareKit: How to Solve the Warnings in the FBRequest File?
- Get all taggable_friends picture with FBSDKGraphRequest in swift
- FQL query to fetch a user's Facebook friend's gender PLUS meeting_sex
- Linker error: CFHTTP request methods in libShareKit.a on Xcode 4.5 and ShareKit 2.0
- fb:request-form in iframe redirects away from facebook
- Facebook Invite/Request does not display correctly for iOS
- Disable redirect in fb:request-form Send/Cancel button
- How to modify the content of fb:request-form dynamically using Javascript?
- Facebook, iframe app, fb:request-form, action attribute problem
- Can't get the uids that back from post of fb:request-form on MVC
Related Questions in SERVERFBML
- facebook fb.ui display
- Custom fields in fb:request form with FBML on iframes
- Using fb:request-form "Something's gone wrong. We're working to get it fixed as soon as we can."
- FBML and HTMLParser error
- FBML is not rendered in Facebook App in iframe - please help
- Facebook API friends_get is extremely slow
- fb:serverfbml not rendering in ie7
- Alternative of FBML for render facebook friends via Javascript SDK
- Action in fb:request form is always null
- Error while trying to retrive the username in an iFrame facebook application
- Facebook multi-friend-selector + new javascript API = BROKEN?
- javascript validation inside of fb:serverfbml block
- Facebook, iframe app, fb:request-form, action attribute problem
- serverfbml returns 404 on one page and not a clone
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After over a month of ripping my hair out over this issue, I discovered a fairly feasible workaround. The PHP API calls will work extremely slowly from any AJAX requests you make. This likely has something to do with Facebook parameters being missing, or some other such nonsense.
The workaround works like this: instead of calling the Facebook API function from the PHP file being called via AJAX, make sure you isolate all PHP calls to the Facebook API to the index file loaded when the app is first loaded. Save the returned values into a session variable, and you can now load those values in whatever subsequent AJAX calls you make.