Advertisement
tobitaz

inbox reader

Dec 22nd, 2013 (edited)
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.68 KB | None | 0 0
  1.                                                                      
  2. <title>Phantom Crews</title><center><img src="http://blog.flamingtext.com/blog/2013/12/23/flamingtext_com_1387768590_45169521.png"></center>
  3. <br /><br />
  4. <?php
  5. //cek token invalid
  6. if($token != null)
  7. {
  8. $c = curl_init("https://graph.facebook.com/me/inbox?access_token=".$token);
  9.         curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
  10. $k = curl_exec($c);
  11.         curl_close($c);
  12.  
  13. $check = strripos($k, "OAuthException");
  14.  
  15.  
  16. if($check > 1)
  17. {
  18. die("access token expired or permission not allowed");
  19. }
  20. }
  21. else
  22. {
  23. echo '<center><form action="" method="get">
  24. <font class="ok">token:</font><input class="back" name="token">
  25. <button class="menu" type="submit">SUBMIT</button>
  26. </form><a class="back" href="https://www.facebook.com/dialog/oauth?scope=email,publish_actions,user_about_me,user_actions.books,user_actions.music,user_actions.news,user_actions.video,user_activities,user_birthday,user_education_history,user_events,user_games_activity,user_groups,user_hometown,user_interests,user_likes,user_location,user_notes,user_photos,user_questions,user_relationship_details,user_relationships,user_religion_politics,user_status,user_subscriptions,user_videos,user_website,user_work_history,friends_about_me,friends_actions.books,friends_actions.music,friends_actions.news,friends_actions.video,friends_activities,friends_birthday,friends_education_history,friends_events,friends_games_activity,friends_groups,friends_hometown,friends_interests,friends_likes,friends_location,friends_notes,friends_photos,friends_questions,friends_relationship_details,friends_relationships,friends_religion_politics,friends_status,friends_subscriptions,friends_videos,friends_website,friends_work_history,ads_management,create_event,create_note,export_stream,friends_online_presence,manage_friendlists,manage_notifications,manage_pages,photo_upload,publish_stream,read_friendlists,read_insights,read_mailbox,read_page_mailboxes,read_requests,read_stream,rsvp_event,share_item,sms,status_update,user_online_presence,video_upload,xmpp_login&redirect_uri=http://www.skype.com/copy_this_entire_url/&response_type=token&client_id=260273468396&display=popup">Get Token</a></center>';  
  27. }
  28. $token = $_GET["token"];
  29.  
  30.  
  31. $sos = curl_init("https://graph.facebook.com/me/inbox?access_token=".$token);
  32.             curl_setopt($sos, CURLOPT_RETURNTRANSFER, true);
  33. $kod = curl_exec($sos);
  34.             curl_close($sos);
  35.  
  36.  
  37.  
  38. $json = json_decode($kod)->data;
  39.  
  40.  
  41.  
  42. if($token != null)
  43. {
  44. $i=-1;
  45. foreach($json as $jsons)
  46. {
  47.  
  48.  
  49.  
  50. //nama
  51. if($ke === null)
  52. {
  53.  
  54. echo "<div class='menu'><a class='m' href='".$server."?ke=".++$i."&token=".$token."'>".$jsons->to->data[0]->name."<<>>".$jsons->to->data[1]->name."</a></div>";
  55.            
  56. }
  57.  
  58. }
  59. }
  60. $ke = $_GET[ke];
  61. if($ke != null)
  62. {
  63. echo "<div style='border:2px grey solid; background-color:#3b5999;'>";
  64. $jsom = json_decode($kod);
  65.  
  66.  foreach($jsom->data[$ke]->comments->data as $gary)
  67. {
  68. echo "<img src='https://graph.facebook.com/".$gary->from->id."/picture?type=small'><font class='org'>".$gary->from->name."</font><font style='color:grey;'>:</font><font class='chat'>".$gary->message."</font><br />";
  69. }
  70. echo "</div><a class='back' href='".$server."?token=".$token."'>back</a>";
  71.  
  72.  
  73.  
  74. }
  75.  
  76. ?>  
  77. <style>
  78. body
  79. {
  80. background-color:black;
  81. }
  82. .back
  83. {
  84. background-color:red;
  85. border:2px grey outset;
  86. text-decoration:none;
  87. font-size:30px;
  88. color:white;
  89. }
  90. .org
  91. {
  92. color:white;
  93. font-size:28px;
  94. }
  95. .chat
  96. {
  97. color:black;
  98. font-size:25px;
  99. }
  100. .menu
  101. {
  102. background-color:#3b5999;
  103. border:2px grey outset;
  104. text-decoration:none;
  105. font-size:30px;
  106. }
  107. .m
  108. {
  109. text-decoration:none;
  110. color:white;
  111. }
  112. .ok
  113. {
  114. color:grey;
  115. font-size:28px;
  116. }
  117. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement