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

Sunday, January 9, 2022

[FIXED] PHP Facebook SDK API get multiple feeds in one request

 January 09, 2022     facebook-graph-api, facebook-php-sdk, php     No comments   

Issue

I am watching 2 pages for used car parts. I want to call both page feeds in a single call sorted by last post. I am trying this code but it doesn't work...

/* PHP SDK v4.0.0 */
/* make the API call */
$request = new FacebookRequest(
  $sess,
  'GET',
  //'/89641180016/feed' //single call works!
   '/89641180016/feed','/93811111500/feed' //multiple call fails
);
$response = $request->execute();
$graphObject = $response->getGraphObject()->AsArray();
/* handle the result */

Solution

You can use /feed?ids=89641180016,93811111500 (see doc: Making Multiple Requests)



Answered By - Yassine Guedidi
  • 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