Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7922445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:57:21+00:00 2026-06-03T16:57:21+00:00

$url = https://graph.facebook.com/fql?q=SELECT%20uid2%20FROM%20friend%20WHERE%20uid1=me()&access_token=sadfasdf; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER,

  • 0
$url = "https://graph.facebook.com/fql?q=SELECT%20uid2%20FROM%20friend%20WHERE%20uid1=me()&access_token=sadfasdf";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5');
$string = curl_exec($ch); // grab URL and pass it to the browser
echo $string;
curl_close($ch);

Right now, echo $string outputs the entire data grabbed as plain text.

{ "data": [
    { "uid2": "91298391" },
    { "uid2": "00291509" },
    { "uid2": "101927261" }
]}

How can I instead grab specific data similar to JSON? In this case, I want to be able to grab every id. I have a feeling I will use preg_match but I’m stumped.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:57:23+00:00Added an answer on June 3, 2026 at 4:57 pm

    php has a built in function for turning a json string into an array.

    json_decode

    the second parameter makes it give you back an assoc array instead of an object. Then just grab the values:

    $ids = array_values(json_decode($string, true));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to capture the access_token returned by this url(below) https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&redirect_uri=YOUR_REDIRECT_URI&client_secret=YOUR_APP_SECRET&code=CODE_GENERATED_BY_FACEBOOK But if I
I have the following url: https://graph.facebook.com/123456/likes?access_token=__ACCESS_TOKEN__&format=json which I then do: $likesList = json_decode(file_get_contents(https://graph.facebook.com/123456/likes?access_token=$access_token&format=json),true); which
This FQL multiquery, for example: https://graph.facebook.com/fql?q={posts:SELECT actor_id,message,permalink,created_time,comments.count FROM stream WHERE source_id=me(),actors:SELECT uid,name,pic_square,profile_url FROM user
I've this generated URL https://graph.facebook.com/me/albums?access_token=123005381082600|2.AtN22PtKsPB6tN_naD7ZWA__.3600.1298494800-602414132|4I62wGohikRAtIPYTU4jy7__I9A&type=post&name=refacingme is this URL correct for creating an album using
I am developing a iPhone application which get facebook album with this URL https://graph.facebook.com/me/albums?access_token=2227470867|2.ZJr73vaEvFeN4fI_A70RFw__.3600.1297090800-100000566543036|WmgxdwULBgKXl8J7ksGIA1tyGik
I know there's a Graph api url for getting the recent wall feeds: https://graph.facebook.com/me/feed?access_token=...
I have this code: $(document).ready(function() { var url = https://graph.facebook.com/search?q=cinema&type=post; $.ajax({ type: POST, url:
I'm using the following code to retrieve a user's friends: $fql_query_url = 'https://graph.facebook.com/fql?q=SELECT+uid,+name,+pic_square+FROM+user+WHERE+uid+IN+(SELECT+uid2+FROM+friend+WHERE+uid1+=+me())+order+by+name&access_token=' .
When asking for authorisation by redirecting to the following url: https://graph.facebook.com/oauth/authorize?client_id=...&scope=email,offline_access&redirect_uri=http%3A%2F%2Flocalhost%2Flogin%2Findex.php%3Fcallback%3Dfacebook Facebook returns 'Invalid
When asking for authorisation by redirecting to the following url: https://graph.facebook.com/oauth/authorize?client_id=144921372242843&redirect_uri=http://localhost:18080/grails/facebook/facebookLogin&scope=user_about_me Facebook returns the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.