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
- How to add the dynamic new rows from my registration form in my database?
- Issue in payment form gateway
- How to create a facet for WP gridbuilder that displays both parent and child custom fields?
- Function in anonymous Laravel Blade component
- How to change woocomerce or full wordpress currency with value from USD to AUD
- General questions about creating a custom theme Moodle CMS
- How to add logging to an abstract class in php
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- Composer installation fails and reverts ./composer.json and ./composer.lock to original content
- How to isolate PHP apps from each other on a local machine(Windows or Linux)?
- Laravel: Using belongsToMany relationship with MongoDB
- window.location.href redirects but is causing problems on the webpage
- Key provided is shorter than 256 bits, only 64 bits provided
- Laravel's whereBetween method not working with two timestamps
- Implementing UUID as primary key in Laravel intermediate table
Related Questions in FACEBOOK
- Facebook Post Images from local system on own Page
- Provide an archipelago name that humans cannot utter
- How can I look this email address
- Not getting all leads from Meta/Facebook using webhook for page leadgens
- Unsupported post request when trying to create a custom audience via the endpoint https://graph.facebook.com/lapi-version), (custom-audience-id/users)
- Java resized JPEG seems to be invalid format for Facebook?
- How to implement facebook pixel in flutter in 2024 any example?
- Need WhatsApp Data Backup from Api
- Facebook login via JS-SDK via OAuth will get stuck half-way
- Short time token with the Graph API and Facebook login through the iOS SDK
- Facing the "Messaging may be unavailable" error - WhatsApp Cloud API
- Facebook Graph API - Story endpoint does not return all active stories
- Javascript / Dynamically append text element above embedded facebook posts
- When I post text with media on Facebook, the text does not show
- How to search a list of groups using facebook APIs
Related Questions in FBREQUEST-FORM
- Get all taggable_friends picture with FBSDKGraphRequest in swift
- How can I retrieve friend's picture through FBRequest in swift
- Display friend Facebook on IOS
- Facebook Invite/Request does not display correctly for iOS
- Linker error: CFHTTP request methods in libShareKit.a on Xcode 4.5 and ShareKit 2.0
- Not receiving response from facebook
- Facebook , OSX and FB Requests
- Check Facebook Permissions on iOS
- FQL query to fetch a user's Facebook friend's gender PLUS meeting_sex
- fb:request-form showing blank page
- Error while doing FQLRequest
- iOS >> ShareKit: How to Solve the Warnings in the FBRequest File?
- Can't get the uids that back from post of fb:request-form on MVC
- fb:request-form in iframe redirects away from facebook
- Facebook API friends_get is extremely slow
Related Questions in SERVERFBML
- Alternative of FBML for render facebook friends via Javascript SDK
- Using fb:request-form "Something's gone wrong. We're working to get it fixed as soon as we can."
- serverfbml returns 404 on one page and not a clone
- Custom fields in fb:request form with FBML on iframes
- facebook fb.ui display
- javascript validation inside of fb:serverfbml block
- Error while trying to retrive the username in an iFrame facebook application
- Action in fb:request form is always null
- Facebook multi-friend-selector + new javascript API = BROKEN?
- Facebook API friends_get is extremely slow
- FBML is not rendered in Facebook App in iframe - please help
- FBML and HTMLParser error
- fb:serverfbml not rendering in ie7
- Facebook, iframe app, fb:request-form, action attribute problem
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 # Hahtags
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.