php - how can i change the friends displayed so my app can be shared? -


i have display shows 6 random friends on facebook when using app, however, figure out how change display, when friend clicked on, sent invite use app.

nothing flash, kind of notification along lines of 'bob thinks should use app' , when clicked, go app.

not sure if help, here code have display friends of user.

code:

<div class= "newboxbottom"> <h1>why not share?</h1> <?php     $user = $facebook->getuser();  if ($user) { $user_profile = $facebook->api('/me'); $friends = $facebook->api('/me/friends?fields=first_name');  echo '<table>'; foreach (array_slice($friends["data"], 0, 6) $value) {     echo '<td>';     echo '<div class="pic">';     echo '<img src="https://graph.facebook.com/' . $value["id"] . '/picture?type=normal"/>';     echo '</div>';     echo '<div align="center">','<font color="white">','<div class="picname">'.$value["first_name"].'</div>','</font>','</div>';     echo '</td>'; } echo '</table>'; } ?> </div> 

many can help.

try looking notification api anvesh mentioned in comment.

you'll want careful notifications , follow recommended best practices. don't want send notifications users not want them in first place. hit negative feedback , shut down facebook.

as how make call? haven't used particular api method, can gather, should able this:

<?php   $parameters = array(      'href' => ''     'template' => ''     'ref' => ''   );   try {     $response = $facebook->api('<enter recipient user facebook id here>/notifications', 'post', $parameters);   } catch (facebookapiexception $e) {     $echo $e->getmessage();   } 

checkout documentation on more information on parameters need pass. hope helps.


Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -