PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, January 10, 2022

[FIXED] Facebook api call in php returns empty

 January 10, 2022     facebook, facebook-fql, facebook-graph-api, facebook-php-sdk, php     No comments   

Issue

I have result of $result = $facebook->api($params); How to extract information from it? Cant decode it using json_decode, gets an error the parameter is string. Searched a lot for the solution, couldn't find any related information.

EDIT

$params = array(

 'method' => 'fql.query',
 'query' => "SELECT uid,pic_square,name,devices FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me())",
    );
  $result = $facebook->api($params);

Could this return empty? Without showing any error? What am I doing wrong?


Solution

Turns out, I was testing it using a test user which had no friends. That was the reason why the response was an empty array.



Answered By - ben_joseph
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing