Note that there are some explanatory texts on larger screens.

plurals
  1. POfix problem hebrew on Facebook
    primarykey
    data
    text
    <p>i have code that know how to connect to user facebook account,and take his name. this function does works well, the problem is , when i try to get hebrew name, than i get gibrish.</p> <p>charset=windows-1255 - i tried UTF-8 too, and still i have gibrish.</p> <p>for gibrish example: ׳׳™׳˜׳ ׳§׳•׳•׳ ׳–</p> <p>the code:</p> <pre><code>require 'src/facebook.php'; $facebook = new Facebook(array( 'appId' =&gt; '1294881225', 'secret' =&gt; '6d28eq8fe1', 'cookie' =&gt; true, )); $session = $facebook-&gt;getSession(); $me = null; // Session based API call. if ($session) { try { $uid = $facebook-&gt;getUser(); $me = $facebook-&gt;api('/me'); } catch (FacebookApiException $e) { error_log($e); } } // login or logout url will be needed depending on current user state. if ($me) { $logoutUrl = $facebook-&gt;getLogoutUrl(); } else { $loginUrl = $facebook-&gt;getLoginUrl(); } </code></pre> <pre><code>&lt;script&gt; window.fbAsyncInit = function() { FB.init({ appId : '&lt;?php echo $facebook-&gt;getAppId(); ?&gt;', session : &lt;?php echo json_encode($session); ?&gt;, // don't refetch the session when PHP already has it status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); // whenever the user logs in, we refresh the page FB.Event.subscribe('auth.login', function() { window.location.reload(); }); }; (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); &lt;/script&gt; &lt;?php echo "&lt;font color=white&gt;name: " . $me['name'] . "&lt;/font&gt;" ; ?&gt; </code></pre> <p>thanks,</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload