English 中文(简体)
4. 给10名朋友打电话,用fql
原标题:Tagging top 10 friends in photo with fql

I want totag more than one friend. I want to tag about 10 friends top 10 if any body knows ? New Here thats why. Here is code:

$user = $facebook->getUser();
 $user_profile = $facebook->api( /me );

$coded = $_REQUEST[ code ];

$access_token = $facebook->getAccessToken();
$name = "".$user_profile[ name ]."";
$fbid = "".$user_profile[ id ]."";


$fql =  https://graph.facebook.com/fql?q=SELECT+uid2+FROM+friend+WHERE+uid1= .$fbid. +ORDER+BY+rand()+LIMIT+1&access_token= .$access_token.  ;
 $fqlresult = file_get_contents($fql); 
   $f = json_decode($fqlresult, true);

 $friends = $f[ data ][ 0 ][ uid2 ];

 $fql2 =  https://graph.facebook.com/ .$friends.  ;
  $fqlresult2 = file_get_contents($fql2); 
 $f2 = json_decode($fqlresult2, true);

 $friend = $f2[ name ];  



 $file= img/ .$fbid. .jpg ; //Example image file
 $data = array(array( tag_uid  => $friends,  x  => rand() % 100,  y  => rand() % 100 ));
 $data = json_encode($data);
//,  tags  => $data,
最佳回答
问题回答

暂无回答




相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...

热门标签