linccce

FB output

Jun 26th, 2014
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.89 KB | None | 0 0
  1. My code:
  2. <?php
  3.  
  4. $facebook = Yii::app()->facebook;
  5. $facebook->getAccessToken();
  6.  
  7. $login = CHtml::link('Login Url', $facebook->getLoginStatusUrl(array('no_user'))).'<br/>';
  8.  
  9. $this->widget('LoginButton', array('registration_url'=>$login));
  10. echo "<Br>";
  11. $this->widget('LoginButton', array('registration_url'=> $facebook->getLogoutUrl(array('next'=>$login)), 'text'=>'Logout'));
  12.  
  13. var_dump($facebook);
  14.  
  15.  
  16.  
  17. echo $facebook->getSignedRequest(); echo "<Br>";
  18.  
  19. var_dump($facebook->getLoginUrl()); echo "<Br>";
  20.  
  21. var_dump($facebook->getLogoutUrl()); echo "<Br>";
  22.  
  23. var_dump($facebook->getLoginStatusUrl()); echo "<Br>";
  24.  
  25. try {
  26. //$facebook->api('/me'); echo "<Br>";
  27. //$facebook->getAccessToken();
  28. $ret = $facebook->api('me?scope=email?fields=id,name' /*array(
  29. 'method' => 'fql.query',
  30. 'query' => 'SELECT name FROM user WHERE uid = me()',
  31. )*/);
  32. var_dump($ret);
  33.  
  34. } catch (FacebookApiException $e) {
  35. var_dump($e->getMessage());
  36. }
  37.  
  38. var_dump($facebook->getProfilePicture('large')); echo "<Br>";
  39.  
  40. echo '<img src="'.$facebook->getProfilePicture('large').'" />'; echo "<Br>";
  41.  
  42. //var_dump($facebook->getProfilePictureById('me?type=large')); echo "<Br>";
  43.  
  44. //echo '<img src="'.$facebook->getProfilePictureById('/me','large').'" />'; echo "<Br>";
  45.  
  46. var_dump($facebook->getInfo()); echo "<Br>";
  47.  
  48. var_dump($facebook->getInfoById('me')); echo "<Br>";
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55. ?>
  56.  
  57. <?php $this->widget('Registration', array(
  58. 'width'=>'900px',
  59. 'registration_url'=>array('/site/facebookregister'),
  60. 'fields'=>"[
  61. {'name':'name'},
  62. {'name':'first_name'},
  63. {'name':'last_name'},
  64. {'name':'email'},
  65. {'name':'password'},
  66. {'name':'location'},
  67. {'name':'captcha'}
  68. ]",
  69. )); ?>
  70.  
  71. My output:
  72.  
  73. object(SFacebook)[49]
  74. private '_facebook' =>
  75. object(SBaseFacebook)[50]
  76. protected 'sharedSessionID' => null
  77. protected 'appId' => string '792113527488047' (length=15)
  78. protected 'appSecret' => string '1f5cf0c17a2b94e744c80e321d4f8013' (length=32)
  79. protected 'user' => null
  80. protected 'signedRequest' => null
  81. protected 'state' => string '389a502405646973548ae37c30e5a8d5' (length=32)
  82. protected 'accessToken' => string '792113527488047|1f5cf0c17a2b94e744c80e321d4f8013' (length=48)
  83. protected 'fileUploadSupport' => boolean false
  84. protected 'trustForwarded' => boolean false
  85. protected 'allowSignedRequest' => boolean true
  86. public 'appId' => string '792113527488047' (length=15)
  87. public 'secret' => string '1f5cf0c17a2b94e744c80e321d4f8013' (length=32)
  88. public 'fileUpload' => boolean false
  89. public 'trustForwarded' => boolean false
  90. public 'allowSignedRequest' => boolean true
  91. public 'status' => boolean true
  92. public 'cookie' => boolean true
  93. public 'oauth' => boolean true
  94. public 'xfbml' => boolean true
  95. public 'jsCallback' => boolean false
  96. private 'callbackScripts' => string '' (length=0)
  97. public 'frictionlessRequests' => boolean false
  98. public 'jsSdk' => boolean true
  99. public 'html5' => boolean true
  100. public 'async' => boolean true
  101. public 'locale' => null
  102. private '_locale' => null
  103. public 'ogTags' =>
  104. array (size=0)
  105. empty
  106. protected 'locales' =>
  107. array (size=108)
  108. 0 => string 'az_AZ' (length=5)
  109. 1 => string 'be_BY' (length=5)
  110. 2 => string 'bg_BG' (length=5)
  111. 3 => string 'bn_IN' (length=5)
  112. 4 => string 'bs_BA' (length=5)
  113. 5 => string 'ca_ES' (length=5)
  114. 6 => string 'ck_US' (length=5)
  115. 7 => string 'cs_CZ' (length=5)
  116. 8 => string 'cy_GB' (length=5)
  117. 9 => string 'da_DK' (length=5)
  118. 10 => string 'de_DE' (length=5)
  119. 11 => string 'eu_ES' (length=5)
  120. 12 => string 'en_GB' (length=5)
  121. 13 => string 'en_PI' (length=5)
  122. 14 => string 'en_UD' (length=5)
  123. 15 => string 'en_US' (length=5)
  124. 16 => string 'es_LA' (length=5)
  125. 17 => string 'es_CL' (length=5)
  126. 18 => string 'es_CO' (length=5)
  127. 19 => string 'es_ES' (length=5)
  128. 20 => string 'es_MX' (length=5)
  129. 21 => string 'es_VE' (length=5)
  130. 22 => string 'fb_FI' (length=5)
  131. 23 => string 'fi_FI' (length=5)
  132. 24 => string 'fr_FR' (length=5)
  133. 25 => string 'gl_ES' (length=5)
  134. 26 => string 'hu_HU' (length=5)
  135. 27 => string 'it_IT' (length=5)
  136. 28 => string 'ja_JP' (length=5)
  137. 29 => string 'ko_KR' (length=5)
  138. 30 => string 'nb_NO' (length=5)
  139. 31 => string 'nn_NO' (length=5)
  140. 32 => string 'nl_NL' (length=5)
  141. 33 => string 'pl_PL' (length=5)
  142. 34 => string 'pt_BR' (length=5)
  143. 35 => string 'pt_PT' (length=5)
  144. 36 => string 'ro_RO' (length=5)
  145. 37 => string 'ru_RU' (length=5)
  146. 38 => string 'sk_SK' (length=5)
  147. 39 => string 'sl_SI' (length=5)
  148. 40 => string 'sv_SE' (length=5)
  149. 41 => string 'th_TH' (length=5)
  150. 42 => string 'tr_TR' (length=5)
  151. 43 => string 'ku_TR' (length=5)
  152. 44 => string 'zh_CN' (length=5)
  153. 45 => string 'zh_HK' (length=5)
  154. 46 => string 'zh_TW' (length=5)
  155. 47 => string 'fb_LT' (length=5)
  156. 48 => string 'af_ZA' (length=5)
  157. 49 => string 'sq_AL' (length=5)
  158. 50 => string 'hy_AM' (length=5)
  159. 51 => string 'hr_HR' (length=5)
  160. 52 => string 'nl_BE' (length=5)
  161. 53 => string 'eo_EO' (length=5)
  162. 54 => string 'et_EE' (length=5)
  163. 55 => string 'fo_FO' (length=5)
  164. 56 => string 'fr_CA' (length=5)
  165. 57 => string 'ka_GE' (length=5)
  166. 58 => string 'el_GR' (length=5)
  167. 59 => string 'gu_IN' (length=5)
  168. 60 => string 'hi_IN' (length=5)
  169. 61 => string 'is_IS' (length=5)
  170. 62 => string 'id_ID' (length=5)
  171. 63 => string 'ga_IE' (length=5)
  172. 64 => string 'jv_ID' (length=5)
  173. 65 => string 'kn_IN' (length=5)
  174. 66 => string 'kk_KZ' (length=5)
  175. 67 => string 'la_VA' (length=5)
  176. 68 => string 'lv_LV' (length=5)
  177. 69 => string 'li_NL' (length=5)
  178. 70 => string 'lt_LT' (length=5)
  179. 71 => string 'mk_MK' (length=5)
  180. 72 => string 'mg_MG' (length=5)
  181. 73 => string 'ms_MY' (length=5)
  182. 74 => string 'mt_MT' (length=5)
  183. 75 => string 'mr_IN' (length=5)
  184. 76 => string 'mn_MN' (length=5)
  185. 77 => string 'ne_NP' (length=5)
  186. 78 => string 'pa_IN' (length=5)
  187. 79 => string 'rm_CH' (length=5)
  188. 80 => string 'sa_IN' (length=5)
  189. 81 => string 'sr_RS' (length=5)
  190. 82 => string 'so_SO' (length=5)
  191. 83 => string 'sw_KE' (length=5)
  192. 84 => string 'tl_PH' (length=5)
  193. 85 => string 'ta_IN' (length=5)
  194. 86 => string 'tt_RU' (length=5)
  195. 87 => string 'te_IN' (length=5)
  196. 88 => string 'ml_IN' (length=5)
  197. 89 => string 'uk_UA' (length=5)
  198. 90 => string 'uz_UZ' (length=5)
  199. 91 => string 'vi_VN' (length=5)
  200. 92 => string 'xh_ZA' (length=5)
  201. 93 => string 'zu_ZA' (length=5)
  202. 94 => string 'km_KH' (length=5)
  203. 95 => string 'tg_TJ' (length=5)
  204. 96 => string 'ar_AR' (length=5)
  205. 97 => string 'he_IL' (length=5)
  206. 98 => string 'ur_PK' (length=5)
  207. 99 => string 'fa_IR' (length=5)
  208. 100 => string 'sy_SY' (length=5)
  209. 101 => string 'yi_DE' (length=5)
  210. 102 => string 'gn_PY' (length=5)
  211. 103 => string 'qu_PE' (length=5)
  212. 104 => string 'ay_BO' (length=5)
  213. 105 => string 'se_NO' (length=5)
  214. 106 => string 'ps_AF' (length=5)
  215. 107 => string 'tl_ST' (length=5)
  216. public 'behaviors' =>
  217. array (size=0)
  218. empty
  219. private '_initialized' (CApplicationComponent) => boolean true
  220. private '_e' (CComponent) => null
  221. private '_m' (CComponent) => null
  222.  
  223. string 'https://www.facebook.com/dialog/oauth?client_id=792113527488047&redirect_uri=http%3A%2F%2Flocalhost%2FYiiMain%2Fapp%2Fsventessvesk%2Findex.php%3Fr%3Dsite%252Ffacebookregister%26https%3D1&state=389a502405646973548ae37c30e5a8d5&sdk=php-sdk-3.2.3' (length=243)
  224.  
  225. string 'https://www.facebook.com/logout.php?next=http%3A%2F%2Flocalhost%2FYiiMain%2Fapp%2Fsventessvesk%2Findex.php%3Fr%3Dsite%252Ffacebookregister%26https%3D1&access_token=0' (length=165)
  226.  
  227. string 'https://www.facebook.com/dialog/oauth?client_id=792113527488047&redirect_uri=http%3A%2F%2Flocalhost%2FYiiMain%2Fapp%2Fsventessvesk%2Findex.php%3Fr%3Dsite%252Ffacebookregister%26https%3D1&state=389a502405646973548ae37c30e5a8d5&sdk=php-sdk-3.2.3&response_type=code&display=none' (length=275)
  228.  
  229. string 'An active access token must be used to query information about the current user.' (length=80)
  230. string 'http://graph.facebook.com/0/picture?type=large' (length=46)
  231.  
  232.  
  233. boolean false
  234.  
  235. boolean false
Advertisement
Add Comment
Please, Sign In to add comment