News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Hasin Hayder's Blog:
Unexpected return value from Facebook FQL.query via PHP REST Lib
February 18, 2008 @ 12:06:00

Hasin Hayder had been working with the Facebook API and stumbled across a bug in an application they had created for the social networking site:

The method which we used to count number of friends of a specific user who has added that application was returning 1 when there is no friend actually installed it.

He gives the SQL query and the PHP code he was originally using to find out the number of users for the application. The problem came from the fact that the returning value wasn't an array - it was a string. The corrected code (that checks for array-ness) is also included.

0 comments voice your opinion now!
facebook query rest library return value array string


blog comments powered by Disqus

Similar Posts

PHP.net: PHP 5.4.14 and PHP 5.3.24 released!

Stas Malyshev's Blog: Shortcuts

PHPMaster.com: REST - Can You do More than Spell It? Part 2

Thomas Weinert: Basics: Using Arduino From PHP

ProDevTips: Sorting 2D-arrays in PHP - anectodes and reflections


Community Events

Don't see your event here?
Let us know!


opinion interview introduction language podcast framework example list community composer symfony yii2 project laravel part2 api php7 voicesoftheelephpant series application

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework