• 12-08-2012, 21:04:22
    #1
    Slm,
    yapmak istedigim su
    <?php
    $purl = 'http://www.example.com';
    $request_url ="https://graph.facebook.com/comments/?ids=$purl";
    $json_string = file_get_contents($request_url);
    $get = json_decode($json_string, true);
    foreach ($get as $key => $val1) {
     foreach ($val1 as $key => $val2) {
     foreach ($val2 as $key => $val) {
     echo "<a href=\"http://www.facebook.com/profile.php?id=".$val["from"]["id"]."\" target=\"_blank\"><img width=\"80\" height=\"80\" src=\"http://graph.facebook.com/".$val["from"]["id"]."/picture\" /></a><p>".$val["message"]."</p><small>Facebook yorum <a href=\"http://www.facebook.com/profile.php?id=".$val["from"]["id"]."\" target=\"_blank\">".$val["from"]["name"]."</a> Tarih: ".$val["created_time"].". Begeni: ".$val["likes"]."</small>";
     }}}
    ?>
    bi turlu facebook'tan gelen verileri degiskenlere ceviremiyorum.
    Yardim edin arkadaslar lütfen

    EDIT: Veriler suradan geliyor:
    http://graph.facebook.com/comments/?...ww.example.com
  • 13-08-2012, 00:44:25
    #2
    <?php
    $purl = 'http://www.example.com';
    $request_url ="https://graph.facebook.com/comments/?ids=$purl";
    $json_string = file_get_contents($request_url);
    $get = json_decode($json_string, true);
    foreach ($get[$purl]['comments']['data'] as $key => $val) {
        echo "<a href=\"http://www.facebook.com/profile.php?id=".$val["from"]["id"]."\" target=\"_blank\"><img width=\"80\" height=\"80\" src=\"http://graph.facebook.com/".$val["from"]["id"]."/picture\" /></a><p>".$val["message"]."</p><small>Facebook yorum <a href=\"http://www.facebook.com/profile.php?id=".$val["from"]["id"]."\" target=\"_blank\">".$val["from"]["name"]."</a> Tarih: ".$val["created_time"].". Begeni: ".$val["user_likes"]."</small>"; 
    }
    ?>